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 LImageViewer::GetBitmapPixel function.

For more control over the annotation, get the annotation container by calling the LImageViewer::GetAnnotationContainer. Then you can apply any function from the annotation toolkit. Then set the modified annotation container by using the LImageViewer::SetAnnotationContainer function.

Save an annotation object to an XML file using the LImageViewer::SaveAnnotation function. To load the previously saved annotation container use the LImageViewer::LoadAnnotation function.

When clicking, double-clicking, moving, etc. the mouse is handled through the LImageViewer::MouseCallBack callback function. This callback function is called, if LImageViewer::EnableMouseCallBack has been set to TRUE.

Features of Version 15 and above:

Add the annotation action to the container by calling the function LImageViewer::AddAction, then assign an annotation object to a mouse button by calling the function LImageViewer::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 LImageViewer::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 LImageViewer::SetRulerUnit. Retrieve the current unit of measure by calling LImageViewer::GetRulerUnit.

Calibrate (set the unit of measure for) the annotation ruler by calling LImageViewer::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 LImageViewer::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 LImageViewer::GetActionProperties. To change annotation action properties, call LImageViewer::SetActionProperties.

Retrieve the attributes of the selected annotation object in the specified sub-cell by calling LImageViewer::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:

Microsoft Code Snippet Picker

LEADTOOLS Support Forums

LEADTOOLS Medical Imaging Support Forum