Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkVtkAnnotation.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkVtkAnnotation_h
14 #define mitkVtkAnnotation_h
15 
16 #include "mitkAnnotation.h"
17 #include <MitkAnnotationExports.h>
18 #include <vtkSmartPointer.h>
19 
20 class vtkProp;
21 
22 namespace mitk
23 {
29  {
30  public:
32  void Update(BaseRenderer *renderer) override;
33  void AddToBaseRenderer(BaseRenderer *renderer) override;
34  void AddToRenderer(BaseRenderer *renderer, vtkRenderer *vtkrenderer) override;
35  void RemoveFromRenderer(BaseRenderer *renderer, vtkRenderer *vtkrenderer) override;
36  void RemoveFromBaseRenderer(BaseRenderer *renderer) override;
37 
45  void Paint(BaseRenderer *renderer);
46 
47  protected:
53  virtual vtkProp *GetVtkProp(BaseRenderer *renderer) const = 0;
54  virtual void UpdateVtkAnnotation(BaseRenderer *renderer) = 0;
55 
57  explicit VtkAnnotation();
58 
60  ~VtkAnnotation() override;
61 
62  private:
65 
67  VtkAnnotation &operator=(const VtkAnnotation &);
68  };
69 
70 } // namespace mitk
71 #endif
#define MITKANNOTATION_EXPORT
Base class for all Annotation This class is to be implemented in order to create Annotation which are...
The VtkAnnotation class is the base for all Annotation which are using the VTK framework to render th...
void AddToRenderer(BaseRenderer *renderer, vtkRenderer *vtkrenderer) override
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to ap...
VtkAnnotation()
explicit constructor which disallows implicit conversions
void Update(BaseRenderer *renderer) override
Applies all properties and should be called before the rendering procedure.
void Paint(BaseRenderer *renderer)
Paints the Annotation.
virtual vtkProp * GetVtkProp(BaseRenderer *renderer) const =0
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp.
void AddToBaseRenderer(BaseRenderer *renderer) override
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to ap...
virtual void UpdateVtkAnnotation(BaseRenderer *renderer)=0
~VtkAnnotation() override
virtual destructor in order to derive from this class
mitkClassMacro(VtkAnnotation, Annotation)
void RemoveFromBaseRenderer(BaseRenderer *renderer) override
Removes the Annotation from the specified renderer. It is not visible anymore then.
void RemoveFromRenderer(BaseRenderer *renderer, vtkRenderer *vtkrenderer) override
Removes the Annotation from the specified renderer. It is not visible anymore then.
Find image slices visible on a given plane.