Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.21
Working With Annotations

The image viewer provides support for using the annotation objects on the cells. To add an annotation action to the container, call the MedicalViewer.AddAction method. Next, assign an annotation object to a mouse button by calling MedicalViewer.SetAction method, specifying the value of the actionType parameter to be one of the following annotation object flags:

MedicalViewerActionType.AnnotationRuler

MedicalViewerActionType.AnnotationAngle

MedicalViewerActionType.AnnotationText

MedicalViewerActionType.AnnotationArrow

MedicalViewerActionType.AnnotationRectangle

MedicalViewerActionType.AnnotationEllipse

MedicalViewerActionType.AnnotationHilite

After the annotation object is assigned to a mouse button, the selected annotation object can be drawn using the mouse button that was assigned to it.

Convert an annotation object to a ROI by calling the MedicalViewerCell.ConvertAnnotationToRegion method. The resulting Region of Interest (ROI) can be combined in many waya with an existing region, if one is defined. The conversion function works only with closed-shape annotation objects like the ellipse, rectangle, hilite annotation, etc. For more information about creating a bitmap region, refer to Creating a Bitmap Region.

Calibrate the annotation ruler by calling the MedicalViewerCell.CalibrateRuler method. If one ruler is calibrated, all the other existing rulers will be calibrated whether they are annotation rulers or cell rulers. The field of view tag will be also updated according to the new value set when the ruler is calibrated. Add the tag by calling the MedicalViewerCell.SetTag method with the type parameter set to MedicalViewerTagType.FieldOfView.

Change the measurement unit of the viewer using the MedicalViewer.MeasurementUnit property.

The annotation actions are like any other container actions. Each annotation type has its own properties class that can be used to set or retrieve its properties. For more information about the available actions and the functions associated with them, refer to Applying Actions.

Retrieve the attributes of a selected annotation object of the specified sub-cell by calling the MedicalViewerCell.GetSelectedAnnotationAttributes method.