]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/Mesh.h
Widget integration (step 5/6): generic widget controller finished and tested on linux...
[cpPlugins.git] / lib / cpPlugins / Interface / Mesh.h
1 #ifndef __CPPLUGINS__INTERFACE__MESH__H__
2 #define __CPPLUGINS__INTERFACE__MESH__H__
3
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/DataObject.h>
6
7 #include <vtkSmartPointer.h>
8 #include <vtkActor.h>
9 #include <vtkPolyDataMapper.h>
10
11 namespace cpPlugins
12 {
13   namespace Interface
14   {
15     /**
16      */
17     class cpPlugins_Interface_EXPORT Mesh
18       : public DataObject
19     {
20     public:
21       typedef Mesh                            Self;
22       typedef DataObject                      Superclass;
23       typedef itk::SmartPointer< Self >       Pointer;
24       typedef itk::SmartPointer< const Self > ConstPointer;
25
26     public:
27       itkNewMacro( Self );
28       itkTypeMacro( Mesh, DataObject );
29       cpPlugins_Id_Macro(
30         cpPlugins::Interface::Mesh, "DataObject"
31         );
32
33     public:
34       template< class M >
35         inline void SetITK( itk::Object* object );
36
37       virtual void SetVTK( vtkObject* mesh );
38
39       virtual void CreateVTKActor( );
40       virtual vtkActor* GetVTKActor( );
41       virtual const vtkActor* GetVTKActor( ) const;
42
43     protected:
44       Mesh( );
45       virtual ~Mesh( );
46
47     private:
48       // Purposely not implemented
49       Mesh( const Self& );
50       Self& operator=( const Self& );
51
52     protected:
53       vtkSmartPointer< vtkActor >          m_Actor;
54       vtkSmartPointer< vtkPolyDataMapper > m_Mapper;
55     };
56
57   } // ecapseman
58
59 } // ecapseman
60
61 #include <cpPlugins/Interface/Mesh.hxx>
62
63 #endif // __CPPLUGINS__INTERFACE__MESH__H__
64
65 // eof - $RCSfile$