]> Creatis software - cpMesh.git/blob - lib/cpm/VTK/ThreadedDeformationObserver.h
First commit
[cpMesh.git] / lib / cpm / VTK / ThreadedDeformationObserver.h
1 #ifndef __CPM__VTK__THREADEDDEFORMATIONOBSERVER__H__
2 #define __CPM__VTK__THREADEDDEFORMATIONOBSERVER__H__
3
4 #include <itkCommand.h>
5 #include <vtkMutexLock.h>
6 #include <vtkRenderWindow.h>
7 #include <vtkSmartPointer.h>
8
9 namespace cpm
10 {
11   namespace VTK
12   {
13     /**
14      */
15     template< class F >
16     class ThreadedDeformationObserver
17       : public itk::Command
18     {
19     public:
20       typedef ThreadedDeformationObserver     Self;
21       typedef itk::Command                    Superclass;
22       typedef itk::SmartPointer< Self >       Pointer;
23       typedef itk::SmartPointer< const Self > ConstPointer;
24
25     public:
26       itkNewMacro( Self );
27       itkTypeMacro( ThreadedDeformationObserver, itkCommand );
28
29     public:
30       void Configure( vtkRenderWindow* w );
31       void Execute( itk::Object* caller, const itk::EventObject& evt );
32       void Execute( const itk::Object* caller, const itk::EventObject& evt );
33
34     protected:
35       ThreadedDeformationObserver( );
36       virtual ~ThreadedDeformationObserver( );
37
38     private:
39       // Purposely not implemented
40       ThreadedDeformationObserver( const Self& );
41       Self& operator=( const Self& );
42
43     protected:
44       vtkRenderWindow* m_Window;
45       vtkSmartPointer< vtkMutexLock > m_MutexLock;
46     };
47
48   } // ecapseman
49
50 } // ecapseman
51
52 #include <cpm/VTK/ThreadedDeformationObserver.hxx>
53
54 #endif // __CPM__VTK__THREADEDDEFORMATIONOBSERVER__H__
55
56 // eof - $RCSfile$