DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomViewer Class / LabelHits Method
The Point in scrren coordinates to be investigated
Indication of whether Viewer-Tied Labels will be investigated
Indication of whether Image-Tied Labels will be investigated






In This Topic
    LabelHits Method
    In This Topic
    Identify labels occupying a give screen point in a DicomViewer
    Syntax
    'Declaration
     
    
    Public Function LabelHits( _
       ByVal p As System.Drawing.Point, _
       ByVal ViewerLabels As System.Boolean, _
       ByVal ImageLabels As System.Boolean _
    ) As DicomLabelCollection
    'Usage
     
    
    Dim instance As DicomViewer
    Dim p As System.Drawing.Point
    Dim ViewerLabels As System.Boolean
    Dim ImageLabels As System.Boolean
    Dim value As DicomLabelCollection
     
    value = instance.LabelHits(p, ViewerLabels, ImageLabels)
    public DicomLabelCollection LabelHits( 
       System.Drawing.Point p,
       System.bool ViewerLabels,
       System.bool ImageLabels
    )
    public function LabelHits( 
        p: System.Drawing.Point;
        ViewerLabels: System.Boolean;
        ImageLabels: System.Boolean
    ): DicomLabelCollection; 
    public function LabelHits( 
       p : System.Drawing.Point,
       ViewerLabels : System.boolean,
       ImageLabels : System.boolean
    ) : DicomLabelCollection;
    public: DicomLabelCollection* LabelHits( 
       System.Drawing.Point p,
       System.bool ViewerLabels,
       System.bool ImageLabels
    ) 
    public:
    DicomLabelCollection^ LabelHits( 
       System.Drawing.Point p,
       System.bool ViewerLabels,
       System.bool ImageLabels
    ) 

    Parameters

    p
    The Point in scrren coordinates to be investigated
    ViewerLabels
    Indication of whether Viewer-Tied Labels will be investigated
    ImageLabels
    Indication of whether Image-Tied Labels will be investigated

    Return Value

    Remarks

    The Point p parameter is normally created directly from the MouseDown event where e.X and e.Y represent the screen coordinates of the mouse-clicked point.

    The area allowed for a "hit" is defined by the label's region and for LabelLine, you can customize the "hit margin" by using the HitMargin value. The default value for HitMargin is 3.

    When writting user interface facilities with this method, it is often useful to be able to highlight selected labels - the SelectMode property is surtable for this purpose.

    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also