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



In This Topic
    WpfMprVisualizationController Class
    In This Topic
    Allows to view different MPR slices in several image viewers.
    Object Model
    WpfMprVisualizationController ClassMprImage Class
    Syntax
    'Declaration
     
    Public Class WpfMprVisualizationController 
    public class WpfMprVisualizationController 
    public __gc class WpfMprVisualizationController 
    public ref class WpfMprVisualizationController 
    Example
    This example 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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also