Available in LEADTOOLS Medical Imaging toolkits. |
Working with Annotations
The image viewer provides support for using annotation objects on Image Viewer Cells.
Features of Version 16 and above:
Convert mouse coordinates into bitmap coordinates using the LImageViewerCell::GetBitmapPixel function.
For more control over the annotation, get the annotation container by calling the LImageViewerCell::GetAnnotationContainer. Then you can apply any function from the annotation toolkit. Then set the modified annotation container by using the LImageViewerCell::SetAnnotationContainer function.
Save an annotation object to an XML file using the LImageViewerCell::SaveAnnotation function. To load the previously saved annotation container use the LImageViewerCell::LoadAnnotation function.
When clicking, double-clicking, moving, etc. the mouse is handled through the LImageViewerCell::MouseCallBack callback function. This callback function is called, if LImageViewerCell::EnableMouseCallBack has been set to TRUE.
Features of Version 15 and above:
Add the annotation action to the container by calling the function LImageViewerCell::AddAction, then assign an annotation object to a mouse button by calling the function LImageViewerCell::SetAction. Specify the value of the nAction parameter with one of the following flags as an annotation object:
CONTAINER_ACTION_ANNOTATION_RULER
CONTAINER_ACTION_ANNOTATION_ANGLE
CONTAINER_ACTION_ANNOTATION_TEXT
CONTAINER_ACTION_ANNOTATION_ARROW
CONTAINER_ACTION_ANNOTATION_RECTANGLE
CONTAINER_ACTION_ANNOTATION_ELLIPSE
CONTAINER_ACTION_ANNOTATION_HILITE
CONTAINER_ACTION_REGION_RECTANGLE
CONTAINER_ACTION_REGION_ELLIPSE
CONTAINER_ACTION_REGION_FREEHAND
CONTAINER_ACTION_REGION_POLYGON
CONTAINER_ACTION_REGION_MAGICWAND
CONTAINER_ACTION_REGION_COLORRANGE
CONTAINER_ACTION_REGION_CIRCLE
CONTAINER_ACTION_REGION_SQUARE
Once the annotation object is assigned to a mouse button, draw the selected annotation object using the assigned mouse button.
Regions
Convert a closed-shape annotation object (ellipse, rectangle, highlight) to a region of interest (ROI) by calling the function LImageViewerCell::AnnToRgn. The resulting ROI (region) can be combined with an existing defined region in many ways.
Rulers and Units of Measure
Change the unit of measure for the container by calling LImageViewerCell::SetRulerUnit. Retrieve the current unit of measure by calling LImageViewerCell::GetRulerUnit.
Calibrate (set the unit of measure for) the annotation ruler by calling LImageViewerCell::CalibrateRuler. Whenever a ruler is calibrated, all other existing annotation and cell rulers will be calibrated as well, and the field of view tag will be updated to match the new value set by calibrating the ruler. This tag can be shown by calling LImageViewerCell::SetCellTag with uType parameter set to DISPWIN_TYPE_FIELDOFVIEW.
Actions, Properties, and Attributes
Annotation actions work like other container actions, using structure DISPANNOTATIONPROPS. Annotation properties can be retrieved by calling LImageViewerCell::GetActionProperties. To change annotation action properties, call LImageViewerCell::SetActionProperties.
Retrieve the attributes of the selected annotation object in the specified sub-cell by calling LImageViewerCell::GetSelectedAnnotationAttributes.
Working with the LEADTOOLS Medical Image Viewer Control
Using the Medical Image Viewer Control
Creating a Bitmap Region Inside the Image Viewer
For more information, refer to:
Summary of All Supported Image File Formats
See Also: