Medical Imaging Interaction Toolkit  2016.11.0
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,
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 mitkSurfaceVtkMapper2D_h
18 #define mitkSurfaceVtkMapper2D_h
19 
20 #include "mitkBaseRenderer.h"
22 #include "mitkVtkMapper.h"
23 #include <MitkCoreExports.h>
24 
25 // VTK
26 #include <vtkSmartPointer.h>
27 class vtkAssembly;
28 class vtkCutter;
29 class vtkPlane;
30 class vtkLookupTable;
31 class vtkGlyph3D;
32 class vtkArrowSource;
33 class vtkReverseSense;
34 
35 namespace mitk
36 {
37  class Surface;
38 
61  {
62  public:
64 
65  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
66 
67  virtual const mitk::Surface *GetInput() const;
68 
70  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;
71 
73  static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = NULL, bool overwrite = false);
74 
77  {
78  public:
80  itk::TimeStamp m_LastUpdateTime;
88  vtkSmartPointer<vtkAssembly> m_PropAssembly;
89 
93  vtkSmartPointer<vtkActor> m_Actor;
97  vtkSmartPointer<vtkActor> m_NormalActor;
101  vtkSmartPointer<vtkActor> m_InverseNormalActor;
105  vtkSmartPointer<vtkPolyDataMapper> m_Mapper;
109  vtkSmartPointer<vtkCutter> m_Cutter;
113  vtkSmartPointer<vtkPlane> m_CuttingPlane;
114 
118  vtkSmartPointer<vtkPolyDataMapper> m_NormalMapper;
119 
123  vtkSmartPointer<vtkPolyDataMapper> m_InverseNormalMapper;
124 
128  vtkSmartPointer<vtkGlyph3D> m_NormalGlyph;
129 
133  vtkSmartPointer<vtkGlyph3D> m_InverseNormalGlyph;
134 
138  vtkSmartPointer<vtkArrowSource> m_ArrowSource;
139 
143  vtkSmartPointer<vtkReverseSense> m_ReverseSense;
144 
146  LocalStorage();
148  ~LocalStorage();
149  };
150 
153 
164  void UpdateVtkTransform(mitk::BaseRenderer * /*renderer*/) override {}
165  protected:
170 
174  virtual ~SurfaceVtkMapper2D();
175 
180  virtual void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override;
181 
189  virtual void ResetMapper(BaseRenderer *renderer) override;
190 
195  void ApplyAllProperties(BaseRenderer *renderer);
196 
201  void Update(BaseRenderer *renderer) override;
202  };
203 } // namespace mitk
204 #endif /* mitkSurfaceVtkMapper2D_h */
void UpdateVtkTransform(mitk::BaseRenderer *) override
UpdateVtkTransform Overwrite the method of the base class.
Vtk-based mapper for cutting 2D slices out of Surfaces.
vtkSmartPointer< vtkPlane > m_CuttingPlane
m_CuttingPlane The plane where to cut off the 2D slice.
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:32
Base class for mapper specific rendering ressources.
Definition: mitkMapper.h:200
#define MITKCORE_EXPORT
Internal class holding the mapper, actor, etc. for each of the 3 2D render windows.
Organizes the rendering process.
vtkSmartPointer< vtkArrowSource > m_ArrowSource
m_ArrowSource Arrow representation of the normals.
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:35
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
DataCollection - Class to facilitate loading/accessing structured data.
vtkSmartPointer< vtkActor > m_InverseNormalActor
m_InverseNormalActor actor for the inverse normals.
Base class of all Vtk Mappers in order to display primitives by exploiting Vtk functionality.
Definition: mitkVtkMapper.h:53
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:54
vtkSmartPointer< vtkGlyph3D > m_InverseNormalGlyph
m_InverseNormalGlyph Glyph for creating inverse normals.
vtkSmartPointer< vtkGlyph3D > m_NormalGlyph
m_NormalGlyph Glyph for creating normals.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
vtkSmartPointer< vtkPolyDataMapper > m_NormalMapper
m_NormalMapper Mapper for the normals.
vtkSmartPointer< vtkPolyDataMapper > m_InverseNormalMapper
m_InverseNormalMapper Mapper for the inverse normals.
vtkSmartPointer< vtkReverseSense > m_ReverseSense
m_ReverseSense Filter to invert the normals.
vtkSmartPointer< vtkActor > m_NormalActor
m_NormalActor actor for the normals.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
vtkSmartPointer< vtkAssembly > m_PropAssembly
m_PropAssembly Contains all vtkProps for the final rendering.
vtkSmartPointer< vtkPolyDataMapper > m_Mapper
m_Mapper VTK mapper for all types of 2D polydata e.g. werewolves.
vtkSmartPointer< vtkActor > m_Actor
m_Actor actor for the surface cut.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66
vtkSmartPointer< vtkCutter > m_Cutter
m_Cutter Filter to cut out the 2D slice.