VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.Dicom.Mpr.UI.VisualTools Namespace / DicomMprTool Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
    DicomMprTool Class
    In This Topic
    Represents a visual tool, which allows to
    1. view DICOM MPR slice in WinForms image viewer
    2. move DICOM MPR slice along the horizontal, vertical and perpendicular axis in WinForms image viewer
    3. rotate DICOM MPR slice in 2D and 3D space in WinForms image viewer
    4. zoom DICOM MPR slice in WinForms image viewer
    5. change the window level of DICOM MPR slice in WinForms image viewer
    6. measure objects on DICOM MPR slice in WinForms image viewer
    7. display the text overlay on DICOM MPR slice in WinForms image viewer.
    Object Model
    MprImageTool DicomViewerTool ImageMeasureTool TextOverlayTool TextOverlayCollection VisualTool VisualTool ImageViewer DicomMprTool
    Syntax
    Remarks

    By default this visual tool uses the left mouse button and mouse wheel for browsing of MPR slices (moving of MPR slice along the perpendicular axis) and uses the right mouse button for zooming of MPR slice.

    Example

    This C#/VB.NET code shows how to display a coronal DICOM MPR slice with metadata in image viewer.

    
    ''' <summary>
    ''' Displays the coronal slice with metadata in viewer.
    ''' </summary>
    ''' <param name="viewer">The image viewer.</param>
    ''' <param name="mprImage">The MPR image.</param>
    Public Shared Sub DisplayCoronalSliceWithMetadataInViewer(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 coronal slice
        Dim coronalSlice As Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice = mprImage.CreateCoronalSlice(mprImage.YLength / 2.0)
    
        ' add slice to the MPR visualization controller
        controller.AddSliceVisualization(coronalSlice, System.Drawing.Color.Yellow)
    
        ' specify that the slice must be shown in viewer
        controller.ShowSliceInViewer(viewer, coronalSlice)
    End Sub
    
    
    
    /// <summary>
    /// Displays the coronal slice with metadata in viewer.
    /// </summary>
    /// <param name="viewer">The image viewer.</param>
    /// <param name="mprImage">The MPR image.</param>
    public static void DisplayCoronalSliceWithMetadataInViewer(
        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 coronal slice
        Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice coronalSlice = 
            mprImage.CreateCoronalSlice(mprImage.YLength / 2.0);
    
        // add slice to the MPR visualization controller
        controller.AddSliceVisualization(coronalSlice, System.Drawing.Color.Yellow);
    
        // specify that the slice must be shown in viewer
        controller.ShowSliceInViewer(viewer, coronalSlice);
    }
    
    

    Inheritance Hierarchy

    System.Object
       Vintasoft.Imaging.UI.VisualTools.VisualTool
          Vintasoft.Imaging.UI.VisualTools.CompositeVisualTool
             Vintasoft.Imaging.Dicom.Mpr.UI.VisualTools.DicomMprTool

    Requirements

    Target Platforms: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also