VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.Dicom.Mpr.Wpf.UI Namespace / WpfMprVisualizationController Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
    WpfMprVisualizationController Class
    In This Topic
    Allows to view different MPR slices in several image viewers.
    Object Model
    MprImage WpfMprVisualizationController
    Syntax
    'Declaration
    
    Public Class WpfMprVisualizationController
    
    
    public class WpfMprVisualizationController
    
    
    public __gc class WpfMprVisualizationController
    
    
    public ref class WpfMprVisualizationController
    
    
    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.Wpf.UI.WpfImageViewer, coronalViewer As Vintasoft.Imaging.Wpf.UI.WpfImageViewer, axialViewer As Vintasoft.Imaging.Wpf.UI.WpfImageViewer, mprImage As Vintasoft.Imaging.Dicom.Mpr.MprImage)
        ' create the MPR visualization controller
        Dim controller As New Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.WpfMprVisualizationController(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.Windows.Media.Colors.LightBlue, mprImage.YLength / 2.0, System.Windows.Media.Colors.Coral, mprImage.ZLength / 2.0, System.Windows.Media.Colors.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.Wpf.UI.WpfImageViewer sagittalViewer,
        Vintasoft.Imaging.Wpf.UI.WpfImageViewer coronalViewer,
        Vintasoft.Imaging.Wpf.UI.WpfImageViewer axialViewer,
        Vintasoft.Imaging.Dicom.Mpr.MprImage mprImage)
    {
        // create the MPR visualization controller
        Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.WpfMprVisualizationController controller =
            new Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.WpfMprVisualizationController(
            mprImage, sagittalViewer, coronalViewer, axialViewer);
    
        // add slices to the MPR visualization controller
        Vintasoft.Imaging.Dicom.Mpr.MprSlice[] slices = controller.AddThreeSlicesVisualization(
            mprImage.XLength / 2.0, System.Windows.Media.Colors.LightBlue,
            mprImage.YLength / 2.0, System.Windows.Media.Colors.Coral,
            mprImage.ZLength / 2.0, System.Windows.Media.Colors.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.Wpf.UI.WpfMprVisualizationController

    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