VintaSoft Imaging .NET SDK v8.8 for .NET Framework
Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.VisualTools Namespace / WpfDicomMprTool Class
Members Example



In This Topic
    WpfDicomMprTool Class
    In This Topic
    A visual tool, which allows to
    1. view of DICOM MPR slice in image viewer
    2. move DICOM MPR slice along the horizontal, vertical and perpendicular axis in image viewer
    3. rotate DICOM MPR slice in 2D and 3D space in image viewer
    4. zoom DICOM MPR slice in image viewer
    5. change the window level of DICOM MPR slice in image viewer
    6. measure objects on DICOM MPR slice in image viewer
    7. display the text overlay on DICOM MPR slice in image viewer.
    Object Model
    WpfDicomMprTool Class
    Syntax
    'Declaration
     
    <DefaultPropertyAttribute("Content")>
    <ContentPropertyAttribute("Content")>
    <LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)>
    <StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)>
    <XmlLangPropertyAttribute("Language")>
    <UsableDuringInitializationAttribute(True)>
    <RuntimeNamePropertyAttribute("Name")>
    <UidPropertyAttribute("Uid")>
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    Public Class WpfDicomMprTool 
       Inherits Vintasoft.Imaging.Wpf.UI.VisualTools.WpfCompositeVisualTool
       Implements Vintasoft.Imaging.UIActions.ISupportUIActions 
    [DefaultProperty("Content")]
    [ContentProperty("Content")]
    [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)]
    [StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
    [XmlLangProperty("Language")]
    [UsableDuringInitialization(true)]
    [RuntimeNameProperty("Name")]
    [UidProperty("Uid")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public class WpfDicomMprTool : Vintasoft.Imaging.Wpf.UI.VisualTools.WpfCompositeVisualTool, Vintasoft.Imaging.UIActions.ISupportUIActions  
    [DefaultProperty("Content")]
    [ContentProperty("Content")]
    [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)]
    [StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
    [XmlLangProperty("Language")]
    [UsableDuringInitialization(true)]
    [RuntimeNameProperty("Name")]
    [UidProperty("Uid")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public __gc class WpfDicomMprTool : public Vintasoft.Imaging.Wpf.UI.VisualTools.WpfCompositeVisualTool, Vintasoft.Imaging.UIActions.ISupportUIActions  
    [DefaultProperty("Content")]
    [ContentProperty("Content")]
    [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)]
    [StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
    [XmlLangProperty("Language")]
    [UsableDuringInitialization(true)]
    [RuntimeNameProperty("Name")]
    [UidProperty("Uid")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public ref class WpfDicomMprTool : public Vintasoft.Imaging.Wpf.UI.VisualTools.WpfCompositeVisualTool, Vintasoft.Imaging.UIActions.ISupportUIActions  
    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 example 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.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, 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.Windows.Media.Colors.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.Wpf.UI.WpfImageViewer viewer,
        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, 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.Windows.Media.Colors.Yellow);
                
        // specify that the slice must be shown in viewer
        controller.ShowSliceInViewer(viewer, coronalSlice);
    }
    Inheritance Hierarchy

    System.Object
       System.Windows.Threading.DispatcherObject
          System.Windows.DependencyObject
             System.Windows.Media.Visual
                System.Windows.UIElement
                   System.Windows.FrameworkElement
                      System.Windows.Controls.Control
                         System.Windows.Controls.ContentControl
                            Vintasoft.Imaging.Wpf.UI.VisualTools.WpfVisualTool
                               Vintasoft.Imaging.Wpf.UI.VisualTools.WpfCompositeVisualTool
                                  Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.VisualTools.WpfDicomMprTool

    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also