Working with Annotations

The image viewer provides support for using the annotation objects on the cells. The user should only add the annotation action to the container by calling the function L_DispContainerAddAction, then he should assign an annotation object to a mouse button by calling the function L_DispContainerSetAction, with specifying the value of nAction parameter by a 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

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

The user can convert annotation object to a ROI by calling the function L_DispContainerAnnToRgn, the resulted ROI (region) can be combined in many way with the existing region, if it is defined. This function works only with close-shape annotation objects, like ellipse, rectangle, hilite annotation..etc.

The use can calibrate the annotation ruler by calling the function L_DispContainerCalibrateRuler, if the user calibrate a ruler, all the other existing ruler will be calibrate whether they are another annotation rulers or cell rulers. Field of view tag will be also updated according the new value set by calibrating the ruler. This tag can be shown by calling the function L_DispContainerSetCellTag with uType parameter set to DISPWIN_TYPE_FIELDOFVIEW.

The user can change the measurement unit of the container by calling the function L_DispContainerSetRulerUnit, he can retrieves the current measurement unit by calling  the function L_DispContainerGetRulerUnit.

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

The user can retrieve the attributes of the selected annotation object of the specified sub-cell by calling the L_DispContainerGetSelectedAnnotationAttributes.