Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkSurfaceVtkMapper2D.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 mitkSurfaceVtkMapper2D_h
14 #define mitkSurfaceVtkMapper2D_h
15 
16 #include "mitkBaseRenderer.h"
18 #include "mitkVtkMapper.h"
19 #include <MitkCoreExports.h>
20 
21 // VTK
22 #include <vtkSmartPointer.h>
23 class vtkAssembly;
24 class vtkCutter;
25 class vtkPlane;
26 class vtkLookupTable;
27 class vtkGlyph3D;
28 class vtkArrowSource;
29 class vtkReverseSense;
30 
31 namespace mitk
32 {
33  class Surface;
34 
57  {
58  public:
60 
61  itkFactorylessNewMacro(Self);
62 
63  itkCloneMacro(Self);
64 
65  virtual const mitk::Surface *GetInput() const;
66 
68  vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
69 
71  static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = nullptr, bool overwrite = false);
72 
75  {
76  public:
78  itk::TimeStamp m_LastUpdateTime;
87 
112 
117 
122 
127 
132 
137 
142 
144  LocalStorage();
146  ~LocalStorage() override;
147  };
148 
151 
162  void UpdateVtkTransform(mitk::BaseRenderer * /*renderer*/) override {}
163  protected:
168 
172  ~SurfaceVtkMapper2D() override;
173 
178  void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
179 
187  void ResetMapper(BaseRenderer *renderer) override;
188 
200  virtual void FixupLegacyProperties(PropertyList *properties);
201 
206  void ApplyAllProperties(BaseRenderer *renderer);
207 
212  void Update(BaseRenderer *renderer) override;
213  };
214 } // namespace mitk
215 #endif
mitk::SurfaceVtkMapper2D::LocalStorage::m_Cutter
vtkSmartPointer< vtkCutter > m_Cutter
m_Cutter Filter to cut out the 2D slice.
Definition: mitkSurfaceVtkMapper2D.h:107
mitk::SurfaceVtkMapper2D::LocalStorage::m_ReverseSense
vtkSmartPointer< vtkReverseSense > m_ReverseSense
m_ReverseSense Filter to invert the normals.
Definition: mitkSurfaceVtkMapper2D.h:141
mitk::SurfaceVtkMapper2D::LocalStorage::m_PropAssembly
vtkSmartPointer< vtkAssembly > m_PropAssembly
m_PropAssembly Contains all vtkProps for the final rendering.
Definition: mitkSurfaceVtkMapper2D.h:86
mitkLocalStorageHandler.h
mitk::SurfaceVtkMapper2D::LocalStorage::m_Actor
vtkSmartPointer< vtkActor > m_Actor
m_Actor actor for the surface cut.
Definition: mitkSurfaceVtkMapper2D.h:91
mitk::SurfaceVtkMapper2D::LocalStorage::m_InverseNormalActor
vtkSmartPointer< vtkActor > m_InverseNormalActor
m_InverseNormalActor actor for the inverse normals.
Definition: mitkSurfaceVtkMapper2D.h:99
vtkSmartPointer< vtkAssembly >
mitk::SurfaceVtkMapper2D::LocalStorage::m_InverseNormalMapper
vtkSmartPointer< vtkPolyDataMapper > m_InverseNormalMapper
m_InverseNormalMapper Mapper for the inverse normals.
Definition: mitkSurfaceVtkMapper2D.h:121
mitk::Surface
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
mitk::SurfaceVtkMapper2D::LocalStorage::m_LastUpdateTime
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
Definition: mitkSurfaceVtkMapper2D.h:78
mitk::SurfaceVtkMapper2D::LocalStorage::m_InverseNormalGlyph
vtkSmartPointer< vtkGlyph3D > m_InverseNormalGlyph
m_InverseNormalGlyph Glyph for creating inverse normals.
Definition: mitkSurfaceVtkMapper2D.h:131
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::LocalStorageHandler< LocalStorage >
mitk::SurfaceVtkMapper2D
Vtk-based mapper for cutting 2D slices out of Surfaces.
Definition: mitkSurfaceVtkMapper2D.h:56
mitk::SurfaceVtkMapper2D::m_LSH
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
Definition: mitkSurfaceVtkMapper2D.h:150
mitk::SurfaceVtkMapper2D::LocalStorage::m_ArrowSource
vtkSmartPointer< vtkArrowSource > m_ArrowSource
m_ArrowSource Arrow representation of the normals.
Definition: mitkSurfaceVtkMapper2D.h:136
mitk::SurfaceVtkMapper2D::LocalStorage::m_NormalGlyph
vtkSmartPointer< vtkGlyph3D > m_NormalGlyph
m_NormalGlyph Glyph for creating normals.
Definition: mitkSurfaceVtkMapper2D.h:126
MitkCoreExports.h
mitk::Mapper
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:46
mitk::VtkMapper
Base class of all Vtk Mappers in order to display primitives by exploiting Vtk functionality.
Definition: mitkVtkMapper.h:47
mitk::SurfaceVtkMapper2D::UpdateVtkTransform
void UpdateVtkTransform(mitk::BaseRenderer *) override
UpdateVtkTransform Overwrite the method of the base class.
Definition: mitkSurfaceVtkMapper2D.h:162
mitk::SurfaceVtkMapper2D::LocalStorage
Internal class holding the mapper, actor, etc. for each of the 3 2D render windows.
Definition: mitkSurfaceVtkMapper2D.h:74
mitk::Mapper::BaseLocalStorage
Base class for mapper specific rendering resources.
Definition: mitkMapper.h:190
mitk::PropertyList
Key-value list holding instances of BaseProperty.
Definition: mitkPropertyList.h:56
mitk::SurfaceVtkMapper2D::LocalStorage::m_Mapper
vtkSmartPointer< vtkPolyDataMapper > m_Mapper
m_Mapper VTK mapper for all types of 2D polydata e.g. werewolves.
Definition: mitkSurfaceVtkMapper2D.h:103
mitk::SurfaceVtkMapper2D::LocalStorage::m_CuttingPlane
vtkSmartPointer< vtkPlane > m_CuttingPlane
m_CuttingPlane The plane where to cut off the 2D slice.
Definition: mitkSurfaceVtkMapper2D.h:111
mitkVtkMapper.h
mitk::SurfaceVtkMapper2D::LocalStorage::m_NormalActor
vtkSmartPointer< vtkActor > m_NormalActor
m_NormalActor actor for the normals.
Definition: mitkSurfaceVtkMapper2D.h:95
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::SurfaceVtkMapper2D::LocalStorage::m_NormalMapper
vtkSmartPointer< vtkPolyDataMapper > m_NormalMapper
m_NormalMapper Mapper for the normals.
Definition: mitkSurfaceVtkMapper2D.h:116
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
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.