Skip to main content

Interface: IAnnotationManager

The interface for any annotation manager (custom or default)

Properties​

addAnnotation()​

addAnnotation: (annotation, groupKey) => void

Adds an annotation to the specified group.

Parameters​

• annotation: Annotation

The annotation to add.

• groupKey: string

The group key to add the annotation to.

Returns​

void

Defined in​

tools/src/types/IAnnotationManager.ts:32


getAnnotation()​

getAnnotation: (annotationUID) => Annotation

Returns the annotation with the specified UID.

Parameters​

• annotationUID: string

The UID of the annotation to retrieve.

Returns​

Annotation

The annotation with the specified UID.

Defined in​

tools/src/types/IAnnotationManager.ts:53


getAnnotations()​

getAnnotations: (groupKey, toolName?) => Annotations | GroupSpecificAnnotations

Returns the annotations associated with the specified group, if the toolName is specified, it will return the annotations for the specified tool.

Parameters​

• groupKey: string

The group key to retrieve annotations for.

• toolName?: string

The name of the tool to retrieve annotations for.

Returns​

Annotations | GroupSpecificAnnotations

The annotations associated with the specified group and tool.

Defined in​

tools/src/types/IAnnotationManager.ts:43


getGroupKey()​

getGroupKey: (annotationGroupSelector) => string

Annotations are stored in Groups. Our default annotation manager groups the annotations based on FrameOfReferenceUID, but it is possible that you can group them based on different aspects or you only have one group totally.

This function returns the group key associated with the specified annotationGroupSelector. The annotationGroupSelector can be an HTML element or a string.

Parameters​

• annotationGroupSelector: AnnotationGroupSelector

The annotation group selector.

Returns​

string

The group key associated with the element.

Defined in​

tools/src/types/IAnnotationManager.ts:25


getNumberOfAllAnnotations()​

getNumberOfAllAnnotations: () => number

Returns the total number of annotations across all groups.

Returns​

number

The total number of annotations across all groups.

Defined in​

tools/src/types/IAnnotationManager.ts:86


getNumberOfAnnotations()​

getNumberOfAnnotations: (groupKey, toolName?) => number

Returns the number of annotations associated with the specified group. If the toolName is specified, it will return the number of annotations

Parameters​

• groupKey: string

The group key to count annotations for.

• toolName?: string

The name of the tool to count annotations for.

Returns​

number

The number of annotations associated with the specified group.

Defined in​

tools/src/types/IAnnotationManager.ts:80


removeAllAnnotations()​

removeAllAnnotations: () => void

Removes all annotations.

Returns​

void

Defined in​

tools/src/types/IAnnotationManager.ts:70


removeAnnotation()​

removeAnnotation: (annotationUID) => void

Removes the annotation with the specified UID.

Parameters​

• annotationUID: string

The UID of the annotation to remove.

Returns​

void

Defined in​

tools/src/types/IAnnotationManager.ts:59


removeAnnotations()​

removeAnnotations: (groupKey) => void

Removes all annotations associated with the specified group.

Parameters​

• groupKey: string

The group key to remove annotations for.

Returns​

void

Defined in​

tools/src/types/IAnnotationManager.ts:65