VintaSoft Imaging .NET SDK 14.0: Документация для .NET разработчика
Vintasoft.Imaging.Dicom.Mpr.UI Namespace / MprVisualizationController Class / MprVisualizationController Constructor(MprImage,ImageViewer[])
Синтаксис Exceptions Example Требования Смотрите также
В этом разделе
    MprVisualizationController Constructor(MprImage,ImageViewer[])
    В этом разделе
    Инициализирует новый экземпляр класса MprVisualizationController.
    Синтаксис
    'Declaration
    
    Public Function New( _
    ByVal mprImage
    Изображение MPR.
    As Vintasoft.Imaging.Dicom.Mpr.MprImage, _
    ByVal ParamArray viewers
    Средства просмотра.
    () As Vintasoft.Imaging.UI.ImageViewer _
    )

    Parameters

    mprImage
    Изображение MPR.
    viewers
    Средства просмотра.
    Исключения
    ИсключениеОписание
    Выбрасывается, если mprImage или viewers равны null или пусты.
    Пример

    Вот C#/VB.NET код, который демонстрирует, как отобразить аксиальный срез DICOM MPR в первом средстве просмотра изображений и построить и отобразить криволинейный срез DICOM MPR, основанный на аксиальном срезе, во втором средстве просмотра изображений.

    
    ''' <summary>
    ''' Displays an axial DICOM MPR slice in the first image viewer and
    ''' builds and displays the curvlinear DICOM MPR slice, which is based on axial slice, in the second image viewer.
    ''' </summary>
    ''' <param name="axialViewer">The viewer with axial slice.</param>
    ''' <param name="curvlinearViewer">The viewer with curvlinear slice.</param>
    ''' <param name="mprImage">The MPR image.</param>
    Public Shared Sub DisplayAxialAndCurvilinearSlicesInTwoViewers(axialViewer As Vintasoft.Imaging.UI.ImageViewer, curvlinearViewer 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, axialViewer, curvlinearViewer)
    
    
        ' create the axial slice
        Dim axialSlice As Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice = mprImage.CreateAxialSlice(mprImage.ZLength / 2.0)
        ' add axial slice to the MPR visualization controller
        controller.AddSliceVisualization(axialSlice, System.Drawing.Color.Yellow)
    
        ' show the axial slice in axialViewer
        controller.ShowSliceInViewer(axialViewer, axialSlice)
    
    
        ' create the curvlinear slice
        Dim curvlinearSlice As Vintasoft.Imaging.Dicom.Mpr.MprCurvilinearSlice = mprImage.CreateCurvilinearSlice(axialSlice, Nothing)
        ' set parameters of curvilinear slice
        curvlinearSlice.RenderingMode = Vintasoft.Imaging.Dicom.Mpr.MprSliceRenderingMode.Avg
        curvlinearSlice.Thickness = 10
        Dim curvlinearSliceVisualizer As New Vintasoft.Imaging.Dicom.Mpr.UI.MprSliceVisualizer(curvlinearSlice, System.Drawing.Color.Blue)
    
        ' get the DICOM MPR tool, which will be used for building the curvilinear slice
        Dim dicomMprTool As Vintasoft.Imaging.Dicom.Mpr.UI.VisualTools.DicomMprTool = controller.GetDicomMprToolAssociatedWithImageViewer(axialViewer)
        ' add the curvilinear slice to the visual tool and start building of slice
        dicomMprTool.MprImageTool.AddAndBuildSlice(curvlinearSliceVisualizer)
    
        ' show the curvlinear slice in curvlinearViewer
        controller.ShowSliceInViewer(curvlinearViewer, curvlinearSlice)
    End Sub
    
    
    
    /// <summary>
    /// Displays an axial DICOM MPR slice in the first image viewer and
    /// builds and displays the curvlinear DICOM MPR slice, which is based on axial slice, in the second image viewer.
    /// </summary>
    /// <param name="axialViewer">The viewer with axial slice.</param>
    /// <param name="curvlinearViewer">The viewer with curvlinear slice.</param>
    /// <param name="mprImage">The MPR image.</param>
    public static void DisplayAxialAndCurvilinearSlicesInTwoViewers(
        Vintasoft.Imaging.UI.ImageViewer axialViewer,
        Vintasoft.Imaging.UI.ImageViewer curvlinearViewer,
        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, axialViewer, curvlinearViewer);
    
    
        // create the axial slice
        Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice axialSlice =
            mprImage.CreateAxialSlice(mprImage.ZLength / 2.0);
        // add axial slice to the MPR visualization controller
        controller.AddSliceVisualization(axialSlice, System.Drawing.Color.Yellow);
    
        // show the axial slice in axialViewer
        controller.ShowSliceInViewer(axialViewer, axialSlice);
    
    
        // create the curvlinear slice
        Vintasoft.Imaging.Dicom.Mpr.MprCurvilinearSlice curvlinearSlice =
            mprImage.CreateCurvilinearSlice(axialSlice, null);
        // set parameters of curvilinear slice
        curvlinearSlice.RenderingMode = Vintasoft.Imaging.Dicom.Mpr.MprSliceRenderingMode.Avg;
        curvlinearSlice.Thickness = 10;
        Vintasoft.Imaging.Dicom.Mpr.UI.MprSliceVisualizer curvlinearSliceVisualizer =
            new Vintasoft.Imaging.Dicom.Mpr.UI.MprSliceVisualizer(curvlinearSlice, System.Drawing.Color.Blue);
    
        // get the DICOM MPR tool, which will be used for building the curvilinear slice
        Vintasoft.Imaging.Dicom.Mpr.UI.VisualTools.DicomMprTool dicomMprTool = 
            controller.GetDicomMprToolAssociatedWithImageViewer(axialViewer);
        // add the curvilinear slice to the visual tool and start building of slice
        dicomMprTool.MprImageTool.AddAndBuildSlice(curvlinearSliceVisualizer);
    
        // show the curvlinear slice in curvlinearViewer
        controller.ShowSliceInViewer(curvlinearViewer, curvlinearSlice);
    }
    
    

    Требования

    Целевые платформы: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    Смотрите также