LEADTOOLS Medical (Leadtools.MedicalViewer assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
MedicalViewerOffset Class
See Also  Members  
Leadtools.MedicalViewer Namespace : MedicalViewerOffset Class



The MedicalViewerOffset Class is available as an add-on to the LEADTOOLS Medical Imaging toolkits.

Represents the class that contains the properties of the offset action.

Object Model

MedicalViewerOffset Class

Syntax

Visual Basic (Declaration) 
Public Class MedicalViewerOffset 
   Inherits MedicalViewerCommonActions
   Implements IDisposable 
Visual Basic (Usage)Copy Code
Dim instance As MedicalViewerOffset
C# 
public class MedicalViewerOffset : MedicalViewerCommonActions, IDisposable  
C++/CLI 
public ref class MedicalViewerOffset : public MedicalViewerCommonActions, IDisposable  

Example

This example changes the offset of the image of the first cell

Visual BasicCopy Code
Public Sub MedicalViewerOffset1()
   Dim myForm As MedicalViewerForm = GetMedicalControl()
   Dim medicalViewer As MedicalViewer = myForm.Viewer
   Dim cell As MedicalViewerMultiCell = CType(medicalViewer.Cells(0), MedicalViewerMultiCell)
   Dim offset As MedicalViewerOffset = CType(cell.GetActionProperties(MedicalViewerActionType.Offset, 0), MedicalViewerOffset)
   offset.X += 50
   offset.Y += 50
   cell.SetActionProperties(MedicalViewerActionType.Offset, offset, 0)
   offset.Dispose()

   myForm.ShowDialog()
End Sub
C#Copy Code
public void MedicalViewerOffset1()
{
   MedicalViewerForm myForm = GetMedicalControl();
   MedicalViewer medicalViewer = myForm.Viewer;
   MedicalViewerMultiCell cell = (MedicalViewerMultiCell)(medicalViewer.Cells[0]);
   MedicalViewerOffset offset = (MedicalViewerOffset)cell.GetActionProperties(MedicalViewerActionType.Offset, 0);
   offset.X += 50;
   offset.Y += 50;
   cell.SetActionProperties(MedicalViewerActionType.Offset, offset, 0);
   offset.Dispose();

   myForm.ShowDialog();
}

Remarks

To set the properties of the offset action, call the MedicalViewerBaseCell.SetActionProperties method. To retrieve the properties call the MedicalViewerBaseCell.GetActionProperties method.

The mouse controls the actions as follows:

  • Click and drag the mouse to start the effect. When the assigned mouse button is released the action ends.
  • Dragging the mouse to the left moves the image to the left.
  • Dragging the mouse to the right moves the image to the right.
  • Dragging the mouse up moves the image up.
  • Dragging the mouse down moves the image down.

Inheritance Hierarchy

System.Object
   Leadtools.MedicalViewer.MedicalViewerBaseAction
      Leadtools.MedicalViewer.MedicalViewerCommonActions
         Leadtools.MedicalViewer.MedicalViewerOffset

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.MedicalViewer requires a Medical Imaging license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features