Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkLabelAnnotation3D.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 LabelAnnotation3D_H
14 #define LabelAnnotation3D_H
15 
16 #include "MitkAnnotationExports.h"
18 #include <mitkVtkAnnotation3D.h>
19 #include <vtkSmartPointer.h>
20 
21 class vtkStringArray;
22 class vtkPolyDataMapper;
23 class vtkPolyData;
24 class vtkActor2D;
25 class vtkProperty2D;
26 class vtkPointSetToLabelHierarchy;
27 class vtkLabelPlacementMapper;
28 class vtkIntArray;
29 
30 namespace mitk
31 {
32  class PointSet;
33 
36  {
37  public:
40  {
41  public:
42  vtkSmartPointer<vtkPolyData> m_Points;
43  vtkSmartPointer<vtkActor2D> m_LabelsActor;
44  vtkSmartPointer<vtkIntArray> m_Sizes;
45  vtkSmartPointer<vtkStringArray> m_Labels;
46  vtkSmartPointer<vtkLabelPlacementMapper> m_LabelMapper;
47  vtkSmartPointer<vtkPointSetToLabelHierarchy> m_PointSetToLabelHierarchyFilter;
48 
50  itk::TimeStamp m_LastUpdateTime;
51 
53  LocalStorage();
55  ~LocalStorage();
56  };
57 
59  itkFactorylessNewMacro(Self);
60  itkCloneMacro(Self);
61 
64  void SetLabelVector(const std::vector<std::string> &LabelVector);
65 
68  void SetPriorityVector(const std::vector<int> &PriorityVector);
69 
71  void SetLabelCoordinates(itk::SmartPointer<PointSet> LabelCoordinates);
72 
73  void PointSetModified(const itk::Object *, const itk::EventObject &);
74 
75  protected:
78 
79  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
80  void UpdateVtkAnnotation(mitk::BaseRenderer *renderer) override;
81 
83  explicit LabelAnnotation3D();
84 
86  ~LabelAnnotation3D() override;
87 
88  private:
90  std::vector<std::string> m_LabelVector;
91 
94  std::vector<int> m_PriorityVector;
95 
97  itk::SmartPointer<PointSet> m_LabelCoordinates;
98 
99  unsigned long m_PointSetModifiedObserverTag;
100 
103 
105  LabelAnnotation3D &operator=(const LabelAnnotation3D &);
106  };
107 
108 } // namespace mitk
109 #endif // LabelAnnotation3D_H
vtkSmartPointer< vtkStringArray > m_Labels
#define MITKANNOTATION_EXPORT
Organizes the rendering process.
vtkSmartPointer< vtkPointSetToLabelHierarchy > m_PointSetToLabelHierarchyFilter
Can display a high amount of 3D labels to a PointSet.
DataCollection - Class to facilitate loading/accessing structured data.
Internal class holding the vtkActor, etc. for each of the render windows.
Base class for mapper specific rendering ressources.
vtkSmartPointer< vtkIntArray > m_Sizes
vtkSmartPointer< vtkActor2D > m_LabelsActor
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
The VtkAnnotation3D class is the basis for all VTK based Annotation which create any 3D element as a ...
Base class for all Annotation This class is to be implemented in order to create Annotation which are...
vtkSmartPointer< vtkPolyData > m_Points
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
vtkSmartPointer< vtkLabelPlacementMapper > m_LabelMapper