HandleMouseUp Method

Summary
Handles the mouse up event that occurs on the control.
Syntax
C#
C++/CLI
public void HandleMouseUp( 
   Control control, 
   MouseEventArgs args, 
   int objectIndex 
) 
public: 
void HandleMouseUp(  
   Control^ control, 
   MouseEventArgs^ args, 
   int objectIndex 
)  

Parameters

control
The control where the objects are rendered.

args
System.Windows.Forms.MouseEventArgs that represents the arguments that are received through one of the mouse events. You must pass the mouse event arguments that were received from the various mouse events, such as MouseDown, MouseUp, MouseMove, etc.

objectIndex
index of the object that will receive the effects of handling the mouse event through this method.

Remarks

This method will automatically handle complicated mouse tasks and will perform the preset actions.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.MedicalViewer; 
using Leadtools.Medical3D; 
 
public void Medical3DControlExample() 
{ 
   Medical3DLoadDICOMSeriesExamples LoadObject = new Medical3DLoadDICOMSeriesExamples(); 
   MedicalViewerSeriesManager output = LoadObject.LoadJamesHead(); 
 
   MainForm1 form = new MainForm1(output); 
   form.ShowDialog(); 
} 
 
// MainForm1 will be the owner of the medical viewer control. 
class MainForm1 : Form 
{ 
   private Medical3DContainer container; 
 
   public MainForm1(MedicalViewerSeriesManager output) 
   { 
      RasterCodecs _codecs = new RasterCodecs(); 
      RasterImage _image; 
 
      CodecsImageInfo codecsInformation; 
 
      this.FormClosing += new FormClosingEventHandler(MainForm1_FormClosing); 
 
      container = new Medical3DContainer(); 
 
      container.Objects.Add(new Medical3DObject()); 
 
      int index; 
 
      codecsInformation = _codecs.GetInformation((string)output.Stacks[0].Items[0].Data, true); 
 
      int width = codecsInformation.Width; 
      int height = codecsInformation.Height; 
      int depth = 256; 
 
      container.Objects[0].MemoryEfficientInit(depth); 
 
      for (index = 0; index < depth; index++) 
      { 
         _image = _codecs.Load((string)output.Stacks[0].Items[index].Data, 0, CodecsLoadByteOrder.BgrOrGrayOrRomm, 1, 1); 
         container.Objects[0].MemoryEfficientSetFrame(_image, index, output.Stacks[0].Items[index].ImagePosition, true); 
      } 
 
      string spearator = ("\\"); 
      string[] test = output.Stacks[0].Items[0].ImageOrientation.Split(spearator.ToCharArray()); 
      float[] orientation = new float[6]; 
      int i; 
      for (i = 0; i < 6; i++) 
      { 
         orientation[i] = (float)Convert.ToDouble(test[i]); 
      } 
 
      container.Objects[0].MemoryEfficientEnd(orientation, output.Stacks[0].PixelSpacing); 
 
 
      this.MouseDown += new MouseEventHandler(_control_MouseDown); 
      this.MouseMove += new MouseEventHandler(_control_MouseMove); 
      this.MouseUp += new MouseEventHandler(_control_MouseUp); 
 
   } 
 
   protected override void OnSizeChanged(EventArgs e) 
   { 
      container.Render(this); 
   } 
 
   protected override void OnPaint(PaintEventArgs e) 
   { 
      container.Render(this); 
   } 
 
   void MainForm1_FormClosing(object sender, FormClosingEventArgs e) 
   { 
      container.Dispose(); 
   } 
 
   void _control_MouseUp(object sender, MouseEventArgs e) 
   { 
      container.HandleMouseUp(this, e, 0); 
   } 
 
   void _control_MouseMove(object sender, MouseEventArgs e) 
   { 
      container.HandleMouseMove(this, e, 0); 
   } 
 
   void _control_MouseDown(object sender, MouseEventArgs e) 
   { 
      container.HandleMouseDown(MedicalViewerActionType.Rotate3DObject, this, e, 0); 
   } 
 
} 
Requirements

Target Platforms

Help Version 22.0.2023.1.24
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Medical3D Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.