1 #ifndef __FPA__VTK__IMAGE__OBSERVER3D__H__
2 #define __FPA__VTK__IMAGE__OBSERVER3D__H__
6 #include <itkCommand.h>
9 #include <vtkPolyData.h>
10 #include <vtkPolyDataMapper.h>
11 #include <vtkSmartPointer.h>
21 template< class F, class R >
26 typedef Observer3D Self;
27 typedef itk::Command Superclass;
28 typedef itk::SmartPointer< Self > Pointer;
29 typedef itk::SmartPointer< const Self > ConstPointer;
32 typedef R TRenderWindow;
33 typedef typename TFilter::TInputImage TImage;
34 typedef typename TFilter::TVertex TVertex;
35 typedef typename TFilter::TVertexCompare TVertexCompare;
37 typedef std::set< TVertex > TVertices;
41 itkTypeMacro( Observer3D, itkCommand );
43 itkGetConstMacro( RenderPercentage, double );
44 itkSetMacro( RenderPercentage, double );
47 void SetRenderWindow( R* rw );
49 void Execute( itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE
50 { this->Execute( ( const itk::Object* )( c ), e ); }
51 void Execute( const itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE;
55 virtual ~Observer3D( );
58 Observer3D( const Self& ); // Not impl.
59 void operator=( const Self& ); // Not impl.
62 vtkSmartPointer< vtkPolyData > m_PolyData;
63 vtkSmartPointer< vtkPolyDataMapper > m_PolyDataMapper;
64 vtkSmartPointer< vtkActor > m_PolyDataActor;
65 std::map< TVertex, unsigned long, TVertexCompare > m_PointsToReplace;
66 std::map< TVertex, unsigned long, TVertexCompare > m_PointsInFront;
69 unsigned long m_Count;
70 unsigned long m_RenderCount;
71 double m_RenderPercentage;
80 #ifndef ITK_MANUAL_INSTANTIATION
81 #include <fpa/VTK/Observer3D.hxx>
82 #endif // ITK_MANUAL_INSTANTIATION
84 #endif // __FPA__VTK__IMAGE__OBSERVER3D__H__