DicomObjects.NET10 Documentation
DicomObjects Namespace / DicomImage3D Class / Exclude Method / Exclude(DicomLabel,SKSizeI) Method
The label containing a rectangle or polygon used to define the cut planes
The size of the area in which the image is displayed
Example



In This Topic
    Exclude(DicomLabel,SKSizeI) Method
    In This Topic
    Apply planes to exclude region
    Syntax
    'Declaration
     
    
    Public Overloads Sub Exclude( _
       ByVal Label As DicomLabel, _
       ByVal DisplayArea As SkiaSharp.SKSizeI _
    ) 
    'Usage
     
    
    Dim instance As DicomImage3D
    Dim Label As DicomLabel
    Dim DisplayArea As SkiaSharp.SKSizeI
     
    instance.Exclude(Label, DisplayArea)
    public void Exclude( 
       DicomLabel Label,
       SkiaSharp.SKSizeI DisplayArea
    )
    public:
    void Exclude( 
       DicomLabel^ Label,
       SkiaSharp.SKSizeI DisplayArea
    ) 

    Parameters

    Label
    The label containing a rectangle or polygon used to define the cut planes
    DisplayArea
    The size of the area in which the image is displayed
    Remarks

    For rectangle, 4 planes are generated, each of which is orthogonal to the current display plane, and each includes, at that plane, the line(s) of the label. For Polygon Label, planes will be added per vertex in polygon, redundant planes are removed so the number of planes added is variable. These are added to the InvertPlanes collection, and may therefore subsequently be removed from that collection if necessary. The effect of this function is that any data which posistion falls within boundaries of the label passed in will not be rendered.

    Example
    DicomImage image = new DicomImage("your_3D_dicom_image.dcm");
    DicomVolume volume = new DicomVolume(image);
                        
    RenderMode3D renderMode = RenderMode3D.VR;
    DicomImage3D image3D = new DicomImage3D(volume, renderMode);   
                
    Size displayArea = new Size(image3D.Size.Width, image3D.Size.Height);
    Rectangle clipRectangle = new Rectangle(displayArea.Width / 4, displayArea.Height / 4, displayArea.Width / 2, displayArea.Height / 2);
                        
    DicomLabel clippingLabel = new DicomLabel()
    {
        LabelType = LabelType.Rectangle, 
        Area = clipRectangle, 
        Pen = Pens.Red 
    }
                        
    image3D.Exclude(clippingLabel, displayArea);
    Viewer.Images.Add(image3D);
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also