]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/Mesh.h
...
[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 <vtkPolyData.h>
10 #include <vtkPolyDataMapper.h>
11
12 namespace cpPlugins
13 {
14   namespace Interface
15   {
16     /**
17      */
18     class cpPlugins_Interface_EXPORT Mesh
19       : public DataObject
20     {
21     public:
22       typedef Mesh                            Self;
23       typedef DataObject                      Superclass;
24       typedef itk::SmartPointer< Self >       Pointer;
25       typedef itk::SmartPointer< const Self > ConstPointer;
26
27     public:
28       itkNewMacro( Self );
29       itkTypeMacro( Mesh, DataObject );
30
31     public:
32       template< class M >
33         inline void SetITKMesh( itk::DataObject* object );
34
35       template< class M >
36         inline M* GetITKMesh( );
37
38       template< class M >
39         inline const M* GetITKMesh( ) const;
40
41       virtual void SetVTKMesh( vtkPolyData* mesh );
42       virtual vtkPolyData* GetVTKMesh( );
43       virtual const vtkPolyData* GetVTKMesh( ) const;
44       virtual vtkActor* GetVTKActor( );
45       virtual const vtkActor* GetVTKActor( ) const;
46
47     protected:
48       Mesh( );
49       virtual ~Mesh( );
50
51     private:
52       // Purposely not implemented
53       Mesh( const Self& );
54       Self& operator=( const Self& );
55
56     protected:
57       vtkSmartPointer< vtkActor >          m_Actor;
58       vtkSmartPointer< vtkPolyDataMapper > m_Mapper;
59     };
60
61   } // ecapseman
62
63 } // ecapseman
64
65 #include <cpPlugins/Interface/Mesh.hxx>
66
67 #endif // __CPPLUGINS__INTERFACE__MESH__H__
68
69 // eof - $RCSfile$