]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/Mesh.h
b2fe92302d84c810a20276a0e784320eb5f02f29
[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 <vtkQuadricLODActor.h>
9 #include <vtkPolyDataMapper.h>
10 #include <vtkPolyDataNormals.h>
11 #include <vtkStripper.h>
12
13 namespace cpPlugins
14 {
15   namespace Interface
16   {
17     /**
18      */
19     class cpPlugins_Interface_EXPORT Mesh
20       : public DataObject
21     {
22     public:
23       typedef Mesh                            Self;
24       typedef DataObject                      Superclass;
25       typedef itk::SmartPointer< Self >       Pointer;
26       typedef itk::SmartPointer< const Self > ConstPointer;
27
28     public:
29       itkNewMacro( Self );
30       itkTypeMacro( Mesh, DataObject );
31       cpPlugins_Id_Macro(
32         cpPlugins::Interface::Mesh, "DataObject"
33         );
34
35     public:
36       template< class M >
37         inline void SetITK( itk::Object* object );
38
39       virtual void SetVTK( vtkObject* mesh );
40
41       virtual void CreateVTKActor( );
42       virtual vtkActor* GetVTKActor( );
43       virtual const vtkActor* GetVTKActor( ) const;
44
45     protected:
46       Mesh( );
47       virtual ~Mesh( );
48
49     private:
50       // Purposely not implemented
51       Mesh( const Self& );
52       Self& operator=( const Self& );
53
54     protected:
55       vtkSmartPointer< vtkPolyDataNormals > m_Normals;
56       vtkSmartPointer< vtkStripper >        m_Stripper;
57       vtkSmartPointer< vtkPolyDataMapper >  m_Mapper;
58       vtkSmartPointer< vtkQuadricLODActor > m_Actor;
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$