Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitkPointSetVtkMapper3D.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 mitkPointSetVtkMapper3D_h
14 #define mitkPointSetVtkMapper3D_h
15 
16 #include "mitkBaseRenderer.h"
17 #include "mitkVtkMapper.h"
18 #include <MitkCoreExports.h>
19 #include <vtkSmartPointer.h>
20 
21 class vtkActor;
22 class vtkCellArray;
23 class vtkPropAssembly;
24 class vtkAppendPolyData;
25 class vtkPolyData;
26 class vtkTubeFilter;
27 class vtkPolyDataMapper;
28 class vtkTransformPolyDataFilter;
29 
30 namespace mitk
31 {
32  class PointSet;
33 
91  {
92  public:
94 
95  itkFactorylessNewMacro(Self);
96 
97  itkCloneMacro(Self);
98 
99  virtual const mitk::PointSet *GetInput();
100 
101  // overwritten from VtkMapper3D to be able to return a
102  // m_PointsAssembly which is much faster than a vtkAssembly
103  vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
104  void UpdateVtkTransform(mitk::BaseRenderer *renderer) override;
105 
106  static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = nullptr, bool overwrite = false);
107 
108  /*
109  * \deprecatedSince{2013_12} Use ReleaseGraphicsResources(mitk::BaseRenderer* renderer) instead
110  */
111  DEPRECATED(void ReleaseGraphicsResources(vtkWindow *renWin));
112 
113  void ReleaseGraphicsResources(mitk::BaseRenderer *renderer) override;
114 
116 
117  protected:
119 
120  ~PointSetVtkMapper3D() override;
121 
122  void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
123  void ResetMapper(BaseRenderer *renderer) override;
124  virtual void ApplyAllProperties(mitk::BaseRenderer *renderer, vtkActor *actor);
125  virtual void CreateContour(vtkPoints *points, vtkCellArray *connections);
126  virtual void CreateVTKRenderObjects();
127 
132 
135 
138 
140 
143 
147 
149 
150  // help for contour between points
152 
153  // variables to be able to log, how many inputs have been added to PolyDatas
156 
157  // variables to check if an update of the vtk objects is needed
160  };
161 
162 } // namespace mitk
163 
164 #endif
mitk::PointSetVtkMapper3D::m_NumberOfUnselectedAdded
unsigned int m_NumberOfUnselectedAdded
Definition: mitkPointSetVtkMapper3D.h:155
mitk::PointSetVtkMapper3D::m_VtkPointsTransformer
vtkSmartPointer< vtkTransformPolyDataFilter > m_VtkPointsTransformer
Definition: mitkPointSetVtkMapper3D.h:139
mitk::PointSetVtkMapper3D::m_vtkSelectedPointList
vtkSmartPointer< vtkAppendPolyData > m_vtkSelectedPointList
Definition: mitkPointSetVtkMapper3D.h:133
mitk::PointSetVtkMapper3D::m_UnselectedActor
vtkSmartPointer< vtkActor > m_UnselectedActor
Definition: mitkPointSetVtkMapper3D.h:145
vtkSmartPointer< vtkPoints >
mitk::PointSetVtkMapper3D::m_VtkPointConnections
vtkSmartPointer< vtkCellArray > m_VtkPointConnections
Definition: mitkPointSetVtkMapper3D.h:137
DEPRECATED
#define DEPRECATED(func)
Definition: mitkCommon.h:175
mitk::PointSetVtkMapper3D::m_ContourActor
vtkSmartPointer< vtkActor > m_ContourActor
Definition: mitkPointSetVtkMapper3D.h:146
mitk::PointSetVtkMapper3D::m_NumberOfSelectedAdded
unsigned int m_NumberOfSelectedAdded
Definition: mitkPointSetVtkMapper3D.h:154
mitk::PointSetVtkMapper3D::m_vtkTextList
vtkSmartPointer< vtkAppendPolyData > m_vtkTextList
Definition: mitkPointSetVtkMapper3D.h:151
mitk::PointSetVtkMapper3D::m_SelectedActor
vtkSmartPointer< vtkActor > m_SelectedActor
Definition: mitkPointSetVtkMapper3D.h:144
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::PointSetVtkMapper3D
Vtk-based mapper for PointSet.
Definition: mitkPointSetVtkMapper3D.h:90
mitk::LocalStorageHandler< BaseLocalStorage >
mitk::PointSetVtkMapper3D::m_PointsAssembly
vtkSmartPointer< vtkPropAssembly > m_PointsAssembly
Definition: mitkPointSetVtkMapper3D.h:148
mitk::PointSetVtkMapper3D::m_PointSize
ScalarType m_PointSize
Definition: mitkPointSetVtkMapper3D.h:158
MitkCoreExports.h
mitk::Mapper
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:46
mitk::PointSetVtkMapper3D::m_WorldPositions
vtkSmartPointer< vtkPoints > m_WorldPositions
All point positions, already in world coordinates.
Definition: mitkPointSetVtkMapper3D.h:129
mitk::PointSetVtkMapper3D::m_VtkUnselectedPolyDataMapper
vtkSmartPointer< vtkPolyDataMapper > m_VtkUnselectedPolyDataMapper
Definition: mitkPointSetVtkMapper3D.h:142
mitk::PointSetVtkMapper3D::m_LSH
LocalStorageHandler< BaseLocalStorage > m_LSH
Definition: mitkPointSetVtkMapper3D.h:115
mitk::VtkMapper
Base class of all Vtk Mappers in order to display primitives by exploiting Vtk functionality.
Definition: mitkVtkMapper.h:47
mitk::PointSetVtkMapper3D::m_PointConnections
vtkSmartPointer< vtkCellArray > m_PointConnections
All connections between two points (used for contour drawing)
Definition: mitkPointSetVtkMapper3D.h:131
mitkVtkMapper.h
mitk::PointSetVtkMapper3D::m_ContourRadius
ScalarType m_ContourRadius
Definition: mitkPointSetVtkMapper3D.h:159
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
mitk::PointSet
Data structure which stores a set of points.
Definition: mitkPointSet.h:71
mitk::PointSetVtkMapper3D::m_VtkPoints
vtkSmartPointer< vtkPoints > m_VtkPoints
Definition: mitkPointSetVtkMapper3D.h:136
mitkBaseRenderer.h
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
mitk::ROIMapperHelper::SetDefaultProperties
void SetDefaultProperties(DataNode *node, BaseRenderer *renderer, bool override)
Set common default properties for both 2-d and 3-d ROI mappers.
mitk::PointSetVtkMapper3D::m_VtkSelectedPolyDataMapper
vtkSmartPointer< vtkPolyDataMapper > m_VtkSelectedPolyDataMapper
Definition: mitkPointSetVtkMapper3D.h:141
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20
mitk::PointSetVtkMapper3D::m_vtkUnselectedPointList
vtkSmartPointer< vtkAppendPolyData > m_vtkUnselectedPointList
Definition: mitkPointSetVtkMapper3D.h:134