1 #ifndef __FPA__VTK__IMAGE__OBSERVER2D__H__
2 #define __FPA__VTK__IMAGE__OBSERVER2D__H__
5 #include <itkCommand.h>
7 #include <vtkImageActor.h>
8 #include <vtkImageData.h>
9 #include <vtkPolyData.h>
10 #include <vtkSmartPointer.h>
20 template< class _TFilter, class _TRenderWindow >
25 typedef Observer2D Self;
26 typedef itk::Command Superclass;
27 typedef itk::SmartPointer< Self > Pointer;
28 typedef itk::SmartPointer< const Self > ConstPointer;
30 typedef _TFilter TFilter;
31 typedef _TRenderWindow TRenderWindow;
32 typedef typename TFilter::TInputImage TImage;
33 typedef typename TFilter::TVertex TVertex;
35 typedef std::set< TVertex > TVertices;
39 itkTypeMacro( Observer2D, itkCommand );
41 itkGetConstMacro( RenderPercentage, double );
42 itkSetMacro( RenderPercentage, double );
45 void SetRenderWindow( _TRenderWindow* rw );
47 typename TImage::IndexType idx,
54 void Execute( itk::Object* c, const itk::EventObject& e ) fpa_OVERRIDE
55 { this->Execute( ( const itk::Object* )( c ), e ); }
56 void Execute( const itk::Object* c, const itk::EventObject& e ) fpa_OVERRIDE;
60 virtual ~Observer2D( );
63 // Purposely not implemented
64 Observer2D( const Self& );
65 void operator=( const Self& );
68 vtkSmartPointer< vtkImageData > m_Stencil;
69 vtkSmartPointer< vtkImageActor > m_StencilActor;
71 _TRenderWindow* m_RenderWindow;
72 unsigned long m_Count;
73 unsigned long m_RenderCount;
74 double m_RenderPercentage;
83 #ifndef ITK_MANUAL_INSTANTIATION
84 # include <fpa/VTK/Image/Observer2D.hxx>
85 #endif // ITK_MANUAL_INSTANTIATION
87 #endif // __FPA__VTK__IMAGE__OBSERVER2D__H__