VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.Dicom.Mpr.UI.VisualTools Namespace / MprImageTool Class
Members Example



In This Topic
    MprImageTool Class
    In This Topic
    A visual tool, which allows to
    1. view of DICOM MPR slice in image viewer
    2. move DICOM MPR slice along the horizontal, vertical and perpendicular axis in image viewer
    3. rotate DICOM MPR slice in 2D and 3D space in image viewer
    4. build new DICOM MPR slice in image viewer.
    Object Model
    MprImageTool ClassIInteractionController InterfaceMprSlice ClassMprSliceView ClassImageViewer ClassMprImage ClassMprSliceViewCollection ClassMprSliceView Class
    Syntax
    Remarks
    By default this visual tool uses the left mouse button for browsing of DICOM MPR slices (moving of DICOM MPR slice along the perpendicular axis) and uses the right mouse button for panning of DICOM MPR slice (moving of DICOM MPR slice along the horizontal and vertical axis).
    Example
    This example shows how to display an axial DICOM MPR slice in image viewer.
    ''' <summary>
    ''' Displays the axial slice in viewer.
    ''' </summary>
    ''' <param name="viewer">The image viewer.</param>
    ''' <param name="mprImage">The MPR image.</param>
    Public Shared Sub DisplayAxialSliceInViewer(viewer As Vintasoft.Imaging.UI.ImageViewer, mprImage As Vintasoft.Imaging.Dicom.Mpr.MprImage)
        ' create the MPR visualization controller
        Dim controller As New Vintasoft.Imaging.Dicom.Mpr.UI.MprVisualizationController(mprImage, viewer)
                
        ' create the axial slice
        Dim axialSlice As Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice = mprImage.CreateAxialSlice(mprImage.YLength / 2.0)
                
        ' add slice to the MPR visualization controller
        controller.AddSliceVisualization(axialSlice, System.Drawing.Color.Yellow)
                
        ' specify that the slice must be shown in viewer
        controller.ShowSliceInViewer(viewer, axialSlice)
    End Sub
    /// <summary>
    /// Displays the axial slice in viewer.
    /// </summary>
    /// <param name="viewer">The image viewer.</param>
    /// <param name="mprImage">The MPR image.</param>
    public static void DisplayAxialSliceInViewer(
        Vintasoft.Imaging.UI.ImageViewer viewer, 
        Vintasoft.Imaging.Dicom.Mpr.MprImage mprImage)
    {            
        // create the MPR visualization controller
        Vintasoft.Imaging.Dicom.Mpr.UI.MprVisualizationController controller =
            new Vintasoft.Imaging.Dicom.Mpr.UI.MprVisualizationController(mprImage, viewer);
                
        // create the axial slice
        Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice axialSlice = 
            mprImage.CreateAxialSlice(mprImage.YLength / 2.0);
                
        // add slice to the MPR visualization controller
        controller.AddSliceVisualization(axialSlice, System.Drawing.Color.Yellow);
                
        // specify that the slice must be shown in viewer
        controller.ShowSliceInViewer(viewer, axialSlice);
    }
    Inheritance Hierarchy

    System.Object
       Vintasoft.Imaging.UI.VisualTools.VisualTool
          Vintasoft.Imaging.UI.VisualTools.UserInteraction.UserInteractionVisualTool
             Vintasoft.Imaging.Dicom.Mpr.UI.VisualTools.MprImageTool

    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also