Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkContourModelGLMapper2DBase.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 mitkContourModelGLMapper2DBase_h
14 #define mitkContourModelGLMapper2DBase_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 
38  {
39  public:
41 
42  void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor * actor = nullptr) override;
43 
44  protected:
45  typedef TextAnnotation2D::Pointer TextAnnotationPointerType;
46 
48 
50 
52 
54  TextAnnotationPointerType textAnnotation, const char *text, float rgb[3], Point2D pt2d, mitk::BaseRenderer *);
55 
56  virtual void InternalDrawContour(mitk::ContourModel *renderingContour, mitk::BaseRenderer *renderer);
57 
60 
61  typedef std::vector<BaseRenderer *> RendererListType;
63 
64  private:
65  struct LocalStorage
66  {
69  };
70 
71  LocalStorageHandler<LocalStorage> m_LocalStorageHandler;
72  };
73 
74 } // namespace mitk
75 
76 #endif
#define MITKCONTOURMODEL_EXPORT
Base class for OpenGL based 2D mappers. Provides functionality to draw a contour.
void WriteTextWithAnnotation(TextAnnotationPointerType textAnnotation, const char *text, float rgb[3], Point2D pt2d, mitk::BaseRenderer *)
virtual void InternalDrawContour(mitk::ContourModel *renderingContour, mitk::BaseRenderer *renderer)
void DrawContour(mitk::ContourModel *contour, mitk::BaseRenderer *renderer)
TextAnnotation2D::Pointer TextAnnotationPointerType
TextAnnotationPointerType m_ControlPointNumbersAnnotation
TextAnnotationPointerType m_PointNumbersAnnotation
std::vector< BaseRenderer * > RendererListType
void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor=nullptr) override
Apply specific color and opacity properties read from the PropertyList. Reimplemented in GLmapper (do...
mitkClassMacro(ContourModelGLMapper2DBase, Mapper)
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:47
Find image slices visible on a given plane.