Annotation

Image annotation.

Constructor

new Annotation()

Members

colour :string|undefined

The color: for example 'green', '#00ff00' or 'rgb(0,255,0)'.

Type:
  • string | undefined

id :string

The ID.

Type:
  • string

labelPosition :Point2D|undefined

Label position. If undefined, the default shape label position will be used.

Type:

mathShape :object

The mathematical shape.

Type:
  • object

planeOrigin :Point3D|undefined

The plane origin, the 3D position of index [0, 0, k].

Type:

planePoints :Array.<Point3D>|undefined

A couple of points that help define the annotation plane.

Type:

quantification :object|undefined

Annotation quantification.

Type:
  • object | undefined

referencePoints :Array.<Point2D>|undefined

Additional points used to define the annotation.

Type:

referenceSopUID :string

The reference image SOP UID.

Type:
  • string

textExpr :string|undefined

Text expression. Can contain variables surrounded with '{}' that will be extracted from the quantification object.

Type:
  • string | undefined

Methods

getCentroid() → {Point|undefined}

Get the centroid of the math shape.

Returns:

The 3D centroid point.

Type: 
Point | undefined

getFactory() → {object}

Get the math shape associated draw factory.

Returns:

The factory.

Type: 
object

getOrientationName() → {string|undefined}

Get the orientation name for this annotation.

Returns:

The orientation name, undefined if same as reference data.

Type: 
string | undefined

getText() → {string}

Get the annotation label text by applying the text expression on the current quantification.

Returns:

The resulting text.

Type: 
string

init(viewController)

Initialise the annotation.

Parameters:
NameTypeDescription
viewControllerViewController

The associated view controller.

isCompatibleView(planeHelper) → {boolean}

Check if an input view is compatible with the annotation.

Parameters:
NameTypeDescription
planeHelperPlaneHelper

The input view to check.

Returns:

True if compatible view.

Type: 
boolean

setTextExpr(labelText)

Set the annotation text expression.

Parameters:
NameTypeDescription
labelTextObject.<string, string>

The list of label texts indexed by modality.

setViewController(viewController)

Set the associated view controller if it is compatible.

Parameters:
NameTypeDescription
viewControllerViewController

The view controller.

updateQuantification()

Update the annotation quantification.