Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkLabelOverlay3D.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,
6  Division of Medical and Biological Informatics.
7  All rights reserved.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without
10  even the implied warranty of MERCHANTABILITY or FITNESS FOR
11  A PARTICULAR PURPOSE.
12 
13  See LICENSE.txt or http://www.mitk.org for details.
14 
15  ===================================================================*/
16 
17 #ifndef LabelOverlay3D_H
18 #define LabelOverlay3D_H
19 
20 #include "MitkOverlaysExports.h"
22 #include <mitkVtkOverlay3D.h>
23 #include <vtkSmartPointer.h>
24 
25 class vtkStringArray;
26 class vtkPolyDataMapper;
27 class vtkPolyData;
28 class vtkActor2D;
29 class vtkProperty2D;
30 class vtkPointSetToLabelHierarchy;
31 class vtkLabelPlacementMapper;
32 class vtkIntArray;
33 
34 namespace mitk
35 {
36  class PointSet;
37 
40  {
41  public:
44  {
45  public:
46  vtkSmartPointer<vtkPolyData> m_Points;
47  vtkSmartPointer<vtkActor2D> m_LabelsActor;
48  vtkSmartPointer<vtkIntArray> m_Sizes;
49  vtkSmartPointer<vtkStringArray> m_Labels;
50  vtkSmartPointer<vtkLabelPlacementMapper> m_LabelMapper;
51  vtkSmartPointer<vtkPointSetToLabelHierarchy> m_PointSetToLabelHierarchyFilter;
52 
54  itk::TimeStamp m_LastUpdateTime;
55 
57  LocalStorage();
59  ~LocalStorage();
60  };
61 
63  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
64 
67  void SetLabelVector(const std::vector<std::string> &LabelVector);
68 
71  void SetPriorityVector(const std::vector<int> &PriorityVector);
72 
74  void SetLabelCoordinates(itk::SmartPointer<PointSet> LabelCoordinates);
75 
76  void PointSetModified(const itk::Object *, const itk::EventObject &);
77 
78  protected:
81 
82  virtual vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
83  void UpdateVtkOverlay(mitk::BaseRenderer *renderer) override;
84 
86  explicit LabelOverlay3D();
87 
89  virtual ~LabelOverlay3D();
90 
91  private:
93  std::vector<std::string> m_LabelVector;
94 
97  std::vector<int> m_PriorityVector;
98 
100  itk::SmartPointer<PointSet> m_LabelCoordinates;
101 
102  unsigned long m_PointSetModifiedObserverTag;
103 
105  LabelOverlay3D(const LabelOverlay3D &);
106 
108  LabelOverlay3D &operator=(const LabelOverlay3D &);
109  };
110 
111 } // namespace mitk
112 #endif // LabelOverlay3D_H
vtkSmartPointer< vtkPolyData > m_Points
Templated class for management of LocalStorage implementations in Mappers.
Organizes the rendering process.
Can display a high amount of 3D labels to a PointSet.
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
vtkSmartPointer< vtkPointSetToLabelHierarchy > m_PointSetToLabelHierarchyFilter
vtkSmartPointer< vtkActor2D > m_LabelsActor
The VtkOverlay3D class is the basis for all VTK based Overlays which create any 3D element as a vtkPr...
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
Data structure which stores a set of points. Superclass of mitk::Mesh.
Definition: mitkPointSet.h:79
vtkSmartPointer< vtkStringArray > m_Labels
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Internal class holding the vtkActor, etc. for each of the render windows.
Base class for mapper specific rendering ressources.
Definition: mitkOverlay.h:50
#define MITKOVERLAYS_EXPORT
Base class for all overlays.
Definition: mitkOverlay.h:34
vtkSmartPointer< vtkLabelPlacementMapper > m_LabelMapper
vtkSmartPointer< vtkIntArray > m_Sizes