Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkContourModelMapper2DBase.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 mitkContourModelMapper2DBase_h
14 #define mitkContourModelMapper2DBase_h
15 
16 #include <mitkCommon.h>
17 #include <mitkMapper.h>
18 #include <mitkTextAnnotation2D.h>
20 #include <vtkSmartPointer.h>
21 
22 class vtkContext2D;
23 class vtkOpenGLContextDevice2D;
24 class vtkPen;
25 
26 namespace mitk
27 {
28  class BaseRenderer;
29  class ContourModel;
30 
42  {
43  public:
45 
50  void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor * actor = nullptr) override;
51 
52  protected:
53  typedef TextAnnotation2D::Pointer TextAnnotationPointerType;
54 
56 
58 
60 
62  TextAnnotationPointerType textAnnotation, const char *text, float rgb[3], Point2D pt2d, mitk::BaseRenderer *);
63 
64  virtual void InternalDrawContour(mitk::ContourModel *renderingContour, mitk::BaseRenderer *renderer);
65 
68 
69  typedef std::vector<BaseRenderer *> RendererListType;
71 
72  private:
73  struct LocalStorage
74  {
77  };
78 
79  LocalStorageHandler<LocalStorage> m_LocalStorageHandler;
80  };
81 
82 } // namespace mitk
83 
84 #endif
#define MITKCONTOURMODEL_EXPORT
Organizes the rendering process.
Abstract base class for OpenGL-based 2D contour mappers.
std::vector< BaseRenderer * > RendererListType
void WriteTextWithAnnotation(TextAnnotationPointerType textAnnotation, const char *text, float rgb[3], Point2D pt2d, mitk::BaseRenderer *)
mitkClassMacro(ContourModelMapper2DBase, Mapper)
void DrawContour(mitk::ContourModel *contour, mitk::BaseRenderer *renderer)
TextAnnotation2D::Pointer TextAnnotationPointerType
TextAnnotationPointerType m_PointNumbersAnnotation
virtual void InternalDrawContour(mitk::ContourModel *renderingContour, mitk::BaseRenderer *renderer)
TextAnnotationPointerType m_ControlPointNumbersAnnotation
void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor=nullptr) override
Apply color and opacity properties from the data node to the rendering context.
A time-resolved contour representation consisting of linked vertices in 3D space.
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:56
Find image slices visible on a given plane.