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:

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

Image Viewer Cells

Applying Actions

Creating a Bitmap Region Inside the Image Viewer

Implementing Animation

Working with Annotations

Customizeable Title Bar

For more information, refer to:

Introduction

Example Programs

Summary of All Supported Image File Formats

See Also

LEADTOOLS Support Forums

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.