Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
|
The annotations in MITK are a simple way to display additional information on the render windows. A class, deriving from mitk::Annotation represents an arbitrary 2D or 3D object that can be rendered as an Annotation. This can for example be used for the annotation of 3D points or to Annotation despriptions in the window corners. Instances of the MicroService mitk::AbstractAnnotationRenderer are used to add the annotations to the renderwindows, updating them and depending on their implementation, organize them in a layout. This module contains implementations for mitk::AbstractAnnotationRenderer as well as mitk::Annotation. Currently, the following features are realized within the Annotation module.
This exemplary Annotation can render text as a 2D Annotation which can be placed with the LayoutAnnotationRenderer
This Annotation displays labels in 3D coordinates. The labels always face the camera.
A new custom Annotation should derive from mitkAnnotation or one of the later mentioned subclasses VtkAnnotation2D oder VtkAnnotation3D. There should always be an implementation for the methods AddToBaseRenderer, AddToRenderer, RemoveFromBaseRenderer RemoveFromRenderer and Update. UpdateAnnotation is the procedure that is called when the Annotation properties have changed. If the Annotation is rendered by VTK, this method only applies the properties to the representation. If the custom Annotation requires additional properties, they should be made accessible by getters and setters for a better usability:
VTK based Annotations which are meant to be displayed in 2D over the render window should derive from the mitk::VtkAnnotation2D. The mitk::VtkAnnotation2D is a subclass of Vtk::Annotation, that uses VTK to render the Annotation. This class creates the Annotation representation as a vtkActor2D, and is very easy to implement because only UpdateVtkAnnotation2D and GetVtkActor2D have to be implemented. The add, update and remove methods are implemented in the superclasses. UpdateVtkAnnotation2D only needs to apply the specific properties and GetVtkActor2D simply returns the created vtkActor.
The mitkVtkAnnotation3D works just like mitkVtkAnnotation2D, but it is designed for arbitrary 3D objects which derive from vtkProp,