VintaSoft Imaging .NET SDK 12.3: Documentation for .NET developer
Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.VisualTools Namespace / WpfMprImageTool Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
    WpfMprImageTool Class
    In This Topic
    Represents a visual tool, which allows to
    1. view DICOM MPR slice in WPF image viewer
    2. move DICOM MPR slice along the horizontal, vertical and perpendicular axis in WPF image viewer
    3. rotate DICOM MPR slice in 2D and 3D space in WPF image viewer
    4. build new DICOM MPR slice in WPF image viewer.
    Object Model
    WpfMprSliceViewCollection MprImage MprSlice WpfMprSliceView VintasoftSize IObjectClipboard IWpfInteractionController WpfImageViewer WpfMprImageTool
    Syntax
    'Declaration
    
    <ToolboxItemAttribute("ToolboxItemType = null", "ToolboxItemTypeName = ")>
    <DesignTimeVisibleAttribute("Visible = False")>
    <DefaultPropertyAttribute("Content")>
    <ContentPropertyAttribute("Content")>
    <LocalizabilityAttribute(None)>
    <StyleTypedPropertyAttribute("Property = FocusVisualStyle", "StyleTargetType = System.Windows.Controls.Control")>
    <XmlLangPropertyAttribute("Name = Language")>
    <UsableDuringInitializationAttribute("Usable = True")>
    <RuntimeNamePropertyAttribute("Name = Name")>
    <UidPropertyAttribute()>
    <TypeDescriptionProviderAttribute("TypeName = MS.Internal.ComponentModel.DependencyObjectProvider")>
    <NameScopePropertyAttribute("Name = NameScope", "Type = System.Windows.NameScope")>
    Public NotInheritable Class WpfMprImageTool
       Inherits Vintasoft.Imaging.Wpf.UI.VisualTools.UserInteraction.WpfUserInteractionVisualTool
    
    
    [ToolboxItem("ToolboxItemType = null", "ToolboxItemTypeName = ")]
    [DesignTimeVisible("Visible = False")]
    [DefaultProperty("Content")]
    [ContentProperty("Content")]
    [Localizability(None)]
    [StyleTypedProperty("Property = FocusVisualStyle", "StyleTargetType = System.Windows.Controls.Control")]
    [XmlLangProperty("Name = Language")]
    [UsableDuringInitialization("Usable = True")]
    [RuntimeNameProperty("Name = Name")]
    [UidProperty()]
    [TypeDescriptionProvider("TypeName = MS.Internal.ComponentModel.DependencyObjectProvider")]
    [NameScopeProperty("Name = NameScope", "Type = System.Windows.NameScope")]
    public sealed class WpfMprImageTool : Vintasoft.Imaging.Wpf.UI.VisualTools.UserInteraction.WpfUserInteractionVisualTool
    
    
    [ToolboxItem("ToolboxItemType = null", "ToolboxItemTypeName = ")]
    [DesignTimeVisible("Visible = False")]
    [DefaultProperty("Content")]
    [ContentProperty("Content")]
    [Localizability(None)]
    [StyleTypedProperty("Property = FocusVisualStyle", "StyleTargetType = System.Windows.Controls.Control")]
    [XmlLangProperty("Name = Language")]
    [UsableDuringInitialization("Usable = True")]
    [RuntimeNameProperty("Name = Name")]
    [UidProperty()]
    [TypeDescriptionProvider("TypeName = MS.Internal.ComponentModel.DependencyObjectProvider")]
    [NameScopeProperty("Name = NameScope", "Type = System.Windows.NameScope")]
    public __gc __sealed class WpfMprImageTool : public Vintasoft.Imaging.Wpf.UI.VisualTools.UserInteraction.WpfUserInteractionVisualTool*
    
    
    [ToolboxItem("ToolboxItemType = null", "ToolboxItemTypeName = ")]
    [DesignTimeVisible("Visible = False")]
    [DefaultProperty("Content")]
    [ContentProperty("Content")]
    [Localizability(None)]
    [StyleTypedProperty("Property = FocusVisualStyle", "StyleTargetType = System.Windows.Controls.Control")]
    [XmlLangProperty("Name = Language")]
    [UsableDuringInitialization("Usable = True")]
    [RuntimeNameProperty("Name = Name")]
    [UidProperty()]
    [TypeDescriptionProvider("TypeName = MS.Internal.ComponentModel.DependencyObjectProvider")]
    [NameScopeProperty("Name = NameScope", "Type = System.Windows.NameScope")]
    public ref class WpfMprImageTool sealed : public Vintasoft.Imaging.Wpf.UI.VisualTools.UserInteraction.WpfUserInteractionVisualTool^
    
    
    Remarks

    By default this visual tool uses the left mouse button for browsing of DICOM MPR slices (moving of DICOM MPR slice along the perpendicular axis) and uses the right mouse button for panning of DICOM MPR slice (moving of DICOM MPR slice along the horizontal and vertical axis).

    Example

    This C#/VB.NET code shows how to display an axial DICOM MPR slice in image viewer.

    
    ''' <summary>
    ''' Displays the axial slice in viewer.
    ''' </summary>
    ''' <param name="viewer">The image viewer.</param>
    ''' <param name="mprImage">The MPR image.</param>
    Public Shared Sub DisplayAxialSliceInViewer(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 axial slice
        Dim axialSlice As Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice = mprImage.CreateAxialSlice(mprImage.YLength / 2.0)
    
        ' add slice to the MPR visualization controller
        controller.AddSliceVisualization(axialSlice, System.Windows.Media.Colors.Yellow)
    
        ' specify that the slice must be shown in viewer
        controller.ShowSliceInViewer(viewer, axialSlice)
    End Sub
    
    
    
    /// <summary>
    /// Displays the axial slice in viewer.
    /// </summary>
    /// <param name="viewer">The image viewer.</param>
    /// <param name="mprImage">The MPR image.</param>
    public static void DisplayAxialSliceInViewer(
        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 axial slice
        Vintasoft.Imaging.Dicom.Mpr.MprPlanarSlice axialSlice =
            mprImage.CreateAxialSlice(mprImage.YLength / 2.0);
    
        // add slice to the MPR visualization controller
        controller.AddSliceVisualization(axialSlice, System.Windows.Media.Colors.Yellow);
    
        // specify that the slice must be shown in viewer
        controller.ShowSliceInViewer(viewer, axialSlice);
    }
    
    

    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.UserInteraction.WpfUserInteractionVisualTool
                                  Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.VisualTools.WpfMprImageTool

    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