Skip to main content


In Cornerstone3DTools, Annotation Tools keep their state in a state object. This object is a plain JavaScript object that is used to store the state of the annotation instance. Information such as the statistics of the annotation, its data and camera position are stored in this object.

There are various methods for adding/removing, selection, locking and unlocking of annotations. They can be accessed via the annotations name space in the Cornerstone3DTools by calling:

import { annotation } from '@cornerstonejs/tools';

// All methods to deal with annotation state can be accessed via

// All methods for annotation selection can be accessed via

// All methods for annotation locking can be accessed via

// All methods for annotation styling can be accessed via

// The AnnotationGroup class allows for grouping of annotations

Let's start by looking deeper into each of these methods.