VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.Dicom.Mpr.UI Namespace / MprVisualizationController Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
    MprVisualizationController Class
    In This Topic
    Allows to view different MPR slices in several image viewers.
    Object Model
    MprImage MprVisualizationController
    Syntax
    'Declaration
    
    Public Class MprVisualizationController
    
    
    public class MprVisualizationController
    
    
    public __gc class MprVisualizationController
    
    
    public ref class MprVisualizationController
    
    
    Example

    This C#/VB.NET code shows how to display a coronal, sagittal and axial DICOM MPR slices in 3 image viewers.

    
    ''' <summary>
    ''' Displays the coronal, sagittal and axial DICOM MPR slices in 3 image viewers.
    ''' </summary>
    ''' <param name="sagittalViewer">The sagittal viewer.</param>
    ''' <param name="coronalViewer">The coronal viewer.</param>
    ''' <param name="axialViewer">The axial viewer.</param>
    ''' <param name="mprImage">The MPR image.</param>
    Public Shared Sub DisplayThreePlanarSlicesInThreeViewers(sagittalViewer As Vintasoft.Imaging.UI.ImageViewer, coronalViewer As Vintasoft.Imaging.UI.ImageViewer, axialViewer 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, sagittalViewer, coronalViewer, axialViewer)
    
        ' add slices to the MPR visualization controller
        Dim slices As Vintasoft.Imaging.Dicom.Mpr.MprSlice() = controller.AddThreeSlicesVisualization(mprImage.XLength / 2.0, System.Drawing.Color.LightBlue, mprImage.YLength / 2.0, System.Drawing.Color.Coral, mprImage.ZLength / 2.0, System.Drawing.Color.Yellow)
    
        ' specify that the first slice must be shown in sagittalViewer
        controller.ShowSliceInViewer(sagittalViewer, slices(0))
        ' specify that the second slice must be shown in coronalViewer
        controller.ShowSliceInViewer(coronalViewer, slices(1))
        ' specify that the third slice must be shown in axialViewer
        controller.ShowSliceInViewer(axialViewer, slices(2))
    End Sub
    
    
    
    /// <summary>
    /// Displays the coronal, sagittal and axial DICOM MPR slices in 3 image viewers.
    /// </summary>
    /// <param name="sagittalViewer">The sagittal viewer.</param>
    /// <param name="coronalViewer">The coronal viewer.</param>
    /// <param name="axialViewer">The axial viewer.</param>
    /// <param name="mprImage">The MPR image.</param>
    public static void DisplayThreePlanarSlicesInThreeViewers(
        Vintasoft.Imaging.UI.ImageViewer sagittalViewer,
        Vintasoft.Imaging.UI.ImageViewer coronalViewer,
        Vintasoft.Imaging.UI.ImageViewer axialViewer,
        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, sagittalViewer, coronalViewer, axialViewer);
    
        // add slices to the MPR visualization controller
        Vintasoft.Imaging.Dicom.Mpr.MprSlice[] slices = controller.AddThreeSlicesVisualization(
            mprImage.XLength / 2.0, System.Drawing.Color.LightBlue,
            mprImage.YLength / 2.0, System.Drawing.Color.Coral,
            mprImage.ZLength / 2.0, System.Drawing.Color.Yellow);
    
        // specify that the first slice must be shown in sagittalViewer
        controller.ShowSliceInViewer(sagittalViewer, slices[0]);
        // specify that the second slice must be shown in coronalViewer
        controller.ShowSliceInViewer(coronalViewer, slices[1]);
        // specify that the third slice must be shown in axialViewer
        controller.ShowSliceInViewer(axialViewer, slices[2]);
    }
    
    

    Inheritance Hierarchy

    System.Object
       Vintasoft.Imaging.Dicom.Mpr.UI.MprVisualizationController

    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