DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage3D Class / Exclude 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 Method
    In This Topic
    Apply planes to exclude region
    Syntax
    'Declaration
     
    
    Public Sub Exclude( _
       ByVal Label As DicomLabel, _
       ByVal DisplayArea As System.Drawing.Size _
    ) 
    public void Exclude( 
       DicomLabel Label,
       System.Drawing.Size 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: .NET CLR 4.8 or higher

    See Also