Medical Imaging Interaction Toolkit  2025.12.02
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 mitkLabelAnnotation3D_h
14 #define mitkLabelAnnotation3D_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:
48 
50  itk::TimeStamp m_LastUpdateTime;
51 
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 
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
#define MITKANNOTATION_EXPORT
Base class for mapper specific rendering resources.
Internal class holding the vtkActor, etc. for each of the render windows.
vtkSmartPointer< vtkLabelPlacementMapper > m_LabelMapper
vtkSmartPointer< vtkIntArray > m_Sizes
LocalStorage()
Default constructor of the local storage.
vtkSmartPointer< vtkPointSetToLabelHierarchy > m_PointSetToLabelHierarchyFilter
~LocalStorage()
Default deconstructor of the local storage.
vtkSmartPointer< vtkStringArray > m_Labels
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
vtkSmartPointer< vtkActor2D > m_LabelsActor
vtkSmartPointer< vtkPolyData > m_Points
Can display a high amount of 3D labels to a PointSet.
void SetLabelCoordinates(itk::SmartPointer< PointSet > LabelCoordinates)
Coordinates of the labels.
vtkProp * GetVtkProp(BaseRenderer *renderer) const override
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp.
void PointSetModified(const itk::Object *, const itk::EventObject &)
void UpdateVtkAnnotation(mitk::BaseRenderer *renderer) override
mitkClassMacro(LabelAnnotation3D, mitk::VtkAnnotation3D)
void SetLabelVector(const std::vector< std::string > &LabelVector)
Set the vector of labels that are shown to each corresponding point3D. The size has to be equal to th...
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
LabelAnnotation3D()
explicit constructor which disallows implicit conversions
~LabelAnnotation3D() override
virtual destructor in order to derive from this class
void SetPriorityVector(const std::vector< int > &PriorityVector)
Optional: Provide a vector of priorities. The labels with higher priorities will be visible in lower ...
The VtkAnnotation3D class is the basis for all VTK based Annotation which create any 3D element as a ...
Find image slices visible on a given plane.
std::vector< Label::Pointer > LabelVector
Definition: mitkLabel.h:306