DicomObjects Reference
DicomObjects Reference / DicomViewer Object / LabelHits Method
The point to be investigated
The point to be investigated
Labels in the DicomViewer’s Labels collection
Labels in a DicomImage’s Labels collection, where RotateModeWithImage is set.
Labels in a DicomImage’s Labels collection, where RotateModeWithImage is set.
LabelHits Method
Description
Finds labels covering an area of the viewer
Syntax
Visual Basic
Public Function LabelHits( _
   ByVal x As Single, _
   ByVal y As Single, _
   ByVal ViewerLabels As Boolean, _
   ByVal ImageCellLabels As Boolean, _
   ByVal ImageTiedLabels As Boolean _
) As DicomLabels
Parameters
x
The point to be investigated
y
The point to be investigated
ViewerLabels
Labels in the DicomViewer’s Labels collection
ImageCellLabels
Labels in a DicomImage’s Labels collection, where RotateModeWithImage is set.
ImageTiedLabels
Labels in a DicomImage’s Labels collection, where RotateModeWithImage is set.
Remarks
This method is intended to help those needing to identify which, if any label(s) have been selected by a user.  The x and y parameters, are normally fed directly from the parameters of a MouseDown event.
The area allowed for a “hit” to register is quite generous – any label within the Label’s bounding rectangle is considered to have been “hit”, and will be included in the returned collection.
When writing user interface facilities with this method, it is often useful to be able to highlight some labels – the SelectMode property is suitable for this purpose.
See Also