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 F, class R >
25 typedef Observer2D 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( Observer2D, 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 ) ITK_OVERRIDE
55 { this->Execute( ( const itk::Object* )( c ), e ); }
56 void Execute( const itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE;
60 virtual ~Observer2D( );
63 Observer2D( const Self& ); // Not impl.
64 void operator=( const Self& ); // Not impl.
67 vtkSmartPointer< vtkImageData > m_Stencil;
68 vtkSmartPointer< vtkImageActor > m_StencilActor;
71 unsigned long m_Count;
72 unsigned long m_RenderCount;
73 double m_RenderPercentage;
82 #ifndef ITK_MANUAL_INSTANTIATION
83 #include <fpa/VTK/Image/Observer2D.hxx>
84 #endif // ITK_MANUAL_INSTANTIATION
86 #endif // __FPA__VTK__IMAGE__OBSERVER2D__H__