Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 MITK_ContourModelGLMapper2DBase_H_
14 #define MITK_ContourModelGLMapper2DBase_H_
15 
16 #include "mitkCommon.h"
17 #include "mitkMapper.h"
18 #include "mitkTextAnnotation2D.h"
20 #include "vtkNew.h"
21 
22 class vtkContext2D;
23 class vtkPen;
24 
25 namespace mitk
26 {
27  class BaseRenderer;
28  class ContourModel;
29 
37  {
38  public:
40 
41  void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor * actor = nullptr) override;
42 
43  protected:
45 
47 
48  ~ContourModelGLMapper2DBase() override;
49 
50  void DrawContour(mitk::ContourModel *contour, mitk::BaseRenderer *renderer);
51 
52  void WriteTextWithAnnotation(
53  TextAnnotationPointerType textAnnotation, const char *text, float rgb[3], Point2D pt2d, mitk::BaseRenderer *);
54 
55  virtual void InternalDrawContour(mitk::ContourModel *renderingContour, mitk::BaseRenderer *renderer);
56 
57  void Initialize(mitk::BaseRenderer *renderer);
58 
59  TextAnnotationPointerType m_PointNumbersAnnotation;
60  TextAnnotationPointerType m_ControlPointNumbersAnnotation;
61 
62  typedef std::vector<BaseRenderer *> RendererListType;
63  RendererListType m_RendererList;
64 
66 
67  vtkNew<vtkContext2D> m_Context;
68  };
69 
70 } // namespace mitk
71 
72 #endif
TextAnnotationPointerType m_PointNumbersAnnotation
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
std::vector< BaseRenderer * > RendererListType
Organizes the rendering process.
#define MITKCONTOURMODEL_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:49
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
TextAnnotation2D::Pointer TextAnnotationPointerType
Base class for OpenGL based 2D mappers. Provides functionality to draw a contour. ...
TextAnnotationPointerType m_ControlPointNumbersAnnotation