NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkFastPointSetVtkMapper3D.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkFastPointSetVtkMapper3D_h
16 #define niftkFastPointSetVtkMapper3D_h
17 
18 #include "niftkCoreExports.h"
19 
20 #include <mitkBaseRenderer.h>
21 #include <mitkLocalStorageHandler.h>
22 #include <mitkVtkMapper.h>
23 
24 #include <vtkSmartPointer.h>
25 
26 class vtkPoints;
27 class vtkIdTypeArray;
28 class vtkFloatArray;
29 class vtkCellArray;
30 class vtkPolyData;
31 class vtkPolyDataMapper;
32 class vtkActor;
33 
34 namespace mitk
35 {
36 class PointSet;
37 }
38 
39 namespace niftk
40 {
41 
51 class NIFTKCORE_EXPORT FastPointSetVtkMapper3D : public mitk::VtkMapper
52 {
53 public:
54  mitkClassMacro(FastPointSetVtkMapper3D, mitk::VtkMapper)
55  itkNewMacro(Self)
56 
57  virtual vtkProp* GetVtkProp(mitk::BaseRenderer* renderer) override;
58  virtual const mitk::PointSet* GetInput();
59 
60 protected:
62  virtual ~FastPointSetVtkMapper3D();
63 
66  class LocalStorage : public mitk::Mapper::BaseLocalStorage
67  {
68  public:
69 
70  LocalStorage();
71  ~LocalStorage();
72 
73  vtkSmartPointer<vtkIdTypeArray> m_Indicies;
74  vtkSmartPointer<vtkFloatArray> m_Array;
75  vtkSmartPointer<vtkPoints> m_Points;
76  vtkSmartPointer<vtkCellArray> m_CellArray;
77  vtkSmartPointer<vtkPolyData> m_PolyData;
78  vtkSmartPointer<vtkPolyDataMapper> m_PolyDataMapper;
79  vtkSmartPointer<vtkActor> m_Actor;
80 
81  unsigned long int m_NumberOfPoints;
82 
83  itk::TimeStamp m_ShaderTimestampUpdate;
84  };
85 
86  mitk::LocalStorageHandler<LocalStorage> m_LocalStorage;
87 
88  virtual void GenerateDataForRenderer(mitk::BaseRenderer* renderer) override;
89  virtual void ResetMapper(mitk::BaseRenderer* renderer) override;
90 
91 };
92 
93 }
94 
95 #endif
mitk::LocalStorageHandler< LocalStorage > m_LocalStorage
Definition: niftkFastPointSetVtkMapper3D.h:86
vtkSmartPointer< vtkPolyData > m_PolyData
Definition: niftkFastPointSetVtkMapper3D.h:77
vtkSmartPointer< vtkPolyDataMapper > m_PolyDataMapper
Definition: niftkFastPointSetVtkMapper3D.h:78
Definition: ReceptorMemberCommandTest.cxx:25
Contains the VTK objects necessary to render the mitk::PointSet.
Definition: niftkFastPointSetVtkMapper3D.h:66
vtkSmartPointer< vtkActor > m_Actor
Definition: niftkFastPointSetVtkMapper3D.h:79
vtkSmartPointer< vtkPoints > m_Points
Definition: niftkFastPointSetVtkMapper3D.h:75
Vtk-based mapper for PointSet, that just displays a basic dot for each point.
Definition: niftkFastPointSetVtkMapper3D.h:51
unsigned long int m_NumberOfPoints
Definition: niftkFastPointSetVtkMapper3D.h:81
itk::TimeStamp m_ShaderTimestampUpdate
Definition: niftkFastPointSetVtkMapper3D.h:83
vtkSmartPointer< vtkCellArray > m_CellArray
Definition: niftkFastPointSetVtkMapper3D.h:76
vtkSmartPointer< vtkFloatArray > m_Array
Definition: niftkFastPointSetVtkMapper3D.h:74
vtkSmartPointer< vtkIdTypeArray > m_Indicies
Definition: niftkFastPointSetVtkMapper3D.h:73
Definition: niftkExceptionObject.h:21