1 #ifndef __FPA__VTK__IMAGE3DOBSERVER__H__
2 #define __FPA__VTK__IMAGE3DOBSERVER__H__
6 #include <itkCommand.h>
9 #include <vtkImageData.h>
10 #include <vtkPolyData.h>
11 #include <vtkPolyDataMapper.h>
12 #include <vtkSmartPointer.h>
20 template< class F, class R >
25 typedef Image3DObserver Self;
26 typedef itk::Command Superclass;
27 typedef itk::SmartPointer< Self > Pointer;
28 typedef itk::SmartPointer< const Self > ConstPointer;
31 typedef R TRenderWindow;
32 typedef typename TFilter::TInputImage TImage;
33 typedef typename TFilter::TVertex TVertex;
35 typedef std::set< TVertex > TVertices;
39 itkTypeMacro( Image3DObserver, itkCommand );
41 itkGetConstMacro( RenderPercentage, double );
42 itkSetMacro( RenderPercentage, double );
45 void SetRenderWindow( R* rw );
47 typename TImage::IndexType idx,
54 void Execute( itk::Object* c, const itk::EventObject& e )
55 { this->Execute( ( const itk::Object* )( c ), e ); }
56 void Execute( const itk::Object* c, const itk::EventObject& e );
60 virtual ~Image3DObserver( );
63 Image3DObserver( const Self& ); // Not impl.
64 void operator=( const Self& ); // Not impl.
67 vtkSmartPointer< vtkImageData > m_Stencil;
68 vtkSmartPointer< vtkPolyData > m_PolyData;
69 vtkSmartPointer< vtkPolyDataMapper > m_PolyDataMapper;
70 vtkSmartPointer< vtkActor > m_PolyDataActor;
73 unsigned long m_Count;
74 unsigned long m_RenderCount;
75 double m_RenderPercentage;
81 template< class F, class R >
86 typedef Image3DObserver Self;
87 typedef itk::Command Superclass;
88 typedef itk::SmartPointer< Self > Pointer;
89 typedef itk::SmartPointer< const Self > ConstPointer;
92 typedef R TRenderWindow;
96 itkTypeMacro( Image3DObserver, itkCommand );
98 itkGetConstMacro( RenderPercentage, double );
99 itkSetMacro( RenderPercentage, double );
102 void SetRenderWindow( R* rw );
103 void Execute( itk::Object* c, const itk::EventObject& e )
104 { this->Execute( ( const itk::Object* )( c ), e ); }
105 void Execute( const itk::Object* c, const itk::EventObject& e );
109 virtual ~Image3DObserver( )
113 Image3DObserver( const Self& ); // Not impl.
114 void operator=( const Self& ); // Not impl.
118 unsigned long m_Count;
119 unsigned long m_RenderCount;
120 double m_RenderPercentage;
122 vtkSmartPointer< vtkPolyData > m_Data;
123 vtkSmartPointer< vtkPolyDataMapper > m_Mapper;
124 vtkSmartPointer< vtkActor > m_Actor;
132 #include <fpa/VTK/Image3DObserver.hxx>
134 #endif // __FPA__VTK__IMAGE3DOBSERVER__H__