The Annotation Feature

The image viewer provides support for using the annotation feature on the cells. The user only have add the annotation action to the container using the function LImageViewer::AddAction, then he have to assign an annotation object to a mouse button through the function LImageViewer::SetAction, he can set one of the following annotation action ID’s:

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

Once the annotation object is assigned to a mouse button, he can draw the selected annotation object using the mouse button he assigned.

The user can convert annotation object to a ROI using the function LImageViewer::AnnToRgn, the resulted ROI (region) can be combined in many way with the existing region, if there is one. But keep in mind that this function only works with close-shape annotation, like ellipse, rectangle, hilite annotation..etc.

The use can calibrate the annotation ruler using the function LImageViewer::CalibrateRuler, if the user calibrate a ruler, all the other existing ruler will be calibrate whether they are another annotation rulers or cell rulers. DFOV tag will be also updated according the new value set by calibrating the ruler. This tag can be shown using the function LImageViewer::SetCellTag with uType parameter set to DISPWIN_TYPE_FIELDOFVIEW.

The user can change the measurement unit of the container using the function LImageViewer::SetRulerUnit, he can retrieves the current measurement unit using the function LImageViewer::GetRulerUnit.

The annotation actions are like any other container actions, they have a properties structure DISPANNOTATIONPROPS. The annotation properties can be retrieved by calling LImageViewer::GetActionProperties. To change the properties for annotation action, call LImageViewer::SetActionProperties.