Annotation

Image annotation.

Constructor

new Annotation()

Constructor: set default annotation id and uid.

Classes

Annotation

Members

colour :string

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

Type:
  • string

labelPosition :Point2D|undefined

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

Type:

mathShape :object

Mathematical shape.

Type:
  • object

planeOrigin :Point3D|undefined

Plane origin: 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:

referencedFrameNumber :number|undefined

Referenced frame number.

Type:
  • number | undefined

referencedSopClassUID :string

Referenced image SOP class UID.

Type:
  • string

referencedSopInstanceUID :string

Referenced image SOP isntance UID.

Type:
  • string

textExpr :string

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

Type:
  • string

trackingId :string

Tracking id, unique within domain.

Type:
  • string

trackingUid :string

Tracking Unique id.

Type:
  • string

Methods

addMetaItem(concept, value)

Add annotation meta data.

Parameters:
NameTypeDescription
conceptDicomCode

The concept code.

valueDicomCode | string

The value code.

canView() → {boolean}

Check if the annotation can be displayed: true if it has an associated view controller.

Returns:

True if the annotation can be displayed.

Type: 
boolean

getCentroid() → {Point|undefined}

Get the centroid of the math shape.

Returns:

The 3D centroid point.

Type: 
Point | undefined

getFactory() → {object|undefined}

Get the math shape associated draw factory.

Returns:

The factory.

Type: 
object | undefined

getMetaConceptIds() → {Array.<string>}

Get the concepts ids of the annotation meta data.

Returns:

The ids.

Type: 
Array.<string>

getMetaItem(conceptId) → {object|undefined}

Get an annotation meta data.

Parameters:
NameTypeDescription
conceptIdstring

The value of the concept dicom code.

Returns:

The corresponding meta data item as {concept, value} or undefined.

Type: 
object | undefined

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

removeMetaItem(conceptId)

Remove an annotation meta data.

Parameters:
NameTypeDescription
conceptIdstring

The value of the concept dicom code.

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.