1 #ifndef __FPA__VTK__IMAGE3DOBSERVER__H__
2 #define __FPA__VTK__IMAGE3DOBSERVER__H__
6 #include <itkCommand.h>
9 #include <vtkPolyData.h>
10 #include <vtkPolyDataMapper.h>
11 #include <vtkSmartPointer.h>
19 template< class F, class R >
24 typedef Image3DObserver Self;
25 typedef itk::Command Superclass;
26 typedef itk::SmartPointer< Self > Pointer;
27 typedef itk::SmartPointer< const Self > ConstPointer;
30 typedef R TRenderWindow;
31 typedef typename TFilter::TInputImage TImage;
32 typedef typename TFilter::TVertex TVertex;
33 typedef typename TFilter::TVertexCompare TVertexCompare;
35 typedef std::set< TVertex > TVertices;
39 itkTypeMacro( Image3DObserver, itkCommand );
41 itkGetConstMacro( RenderPercentage, double );
42 itkSetMacro( RenderPercentage, double );
45 void SetRenderWindow( R* rw );
47 void Execute( itk::Object* c, const itk::EventObject& e )
48 { this->Execute( ( const itk::Object* )( c ), e ); }
49 void Execute( const itk::Object* c, const itk::EventObject& e );
53 virtual ~Image3DObserver( );
56 Image3DObserver( const Self& ); // Not impl.
57 void operator=( const Self& ); // Not impl.
60 vtkSmartPointer< vtkPolyData > m_PolyData;
61 vtkSmartPointer< vtkPolyDataMapper > m_PolyDataMapper;
62 vtkSmartPointer< vtkActor > m_PolyDataActor;
63 std::map< TVertex, unsigned long, TVertexCompare > m_PointsToReplace;
64 std::map< TVertex, unsigned long, TVertexCompare > m_PointsInFront;
67 unsigned long m_Count;
68 unsigned long m_RenderCount;
69 double m_RenderPercentage;
76 #ifndef ITK_MANUAL_INSTANTIATION
77 #include <fpa/VTK/Image3DObserver.hxx>
78 #endif // ITK_MANUAL_INSTANTIATION
80 #endif // __FPA__VTK__IMAGE3DOBSERVER__H__