DicomObjects.NET.V8
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 Point, _
       ByVal ViewerLabels As Boolean, _
       ByVal ImageLabels As Boolean _
    ) As DicomLabelCollection
    'Usage
     
    Dim instance As DicomViewer
    Dim p As Point
    Dim ViewerLabels As Boolean
    Dim ImageLabels As Boolean
    Dim value As DicomLabelCollection
     
    value = instance.LabelHits(p, ViewerLabels, ImageLabels)
    public DicomLabelCollection LabelHits( 
       Point p,
       bool ViewerLabels,
       bool ImageLabels
    )
    public:
    DicomLabelCollection^ LabelHits( 
       Point p,
       bool ViewerLabels,
       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 3.5 or higher

    See Also