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.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 |
This example changes the offset of the image of the first cell
Visual Basic | Copy 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(); } |
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.
System.Object
Leadtools.MedicalViewer.MedicalViewerBaseAction
Leadtools.MedicalViewer.MedicalViewerCommonActions
Leadtools.MedicalViewer.MedicalViewerOffset
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7