]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Mesh.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Mesh.h
index 805b8a1d66b76d158b4b84fe5df002cb5bb66693..75c5eb3683e766a6a546e3091330116d170a8b2e 100644 (file)
@@ -1,13 +1,13 @@
 #ifndef __CPPLUGINS__INTERFACE__MESH__H__
 #define __CPPLUGINS__INTERFACE__MESH__H__
 
-#include <map>
-#include <string>
-#include <itkProcessObject.h>
 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/DataObject.h>
 
-class vtkMapper;
+#include <vtkSmartPointer.h>
+#include <vtkActor.h>
+#include <vtkPolyData.h>
+#include <vtkPolyDataMapper.h>
 
 namespace cpPlugins
 {
@@ -19,34 +19,51 @@ namespace cpPlugins
       : public DataObject
     {
     public:
-      typedef Mesh       Self;
-      typedef DataObject Superclass;
+      typedef Mesh                            Self;
+      typedef DataObject                      Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
 
     public:
-      Mesh( );
-      virtual ~Mesh( );
+      itkNewMacro( Self );
+      itkTypeMacro( Mesh, DataObject );
 
-      virtual std::string GetClassName( ) const;
-      virtual void SetDataObject( itk::DataObject* dobj );
+    public:
+      template< class M >
+        inline void SetITKMesh( itk::DataObject* object );
 
-      vtkMapper* GetVTKMapper( ) const;
+      template< class M >
+        inline M* GetITKMesh( );
 
-    protected:
       template< class M >
-        void _Map( );
+        inline const M* GetITKMesh( ) const;
+
+      virtual void SetVTKMesh( vtkPolyData* mesh );
+      virtual vtkPolyData* GetVTKMesh( );
+      virtual const vtkPolyData* GetVTKMesh( ) const;
+      virtual vtkActor* GetVTKActor( );
+      virtual const vtkActor* GetVTKActor( ) const;
 
     protected:
-      /*
-        itk::ProcessObject::Pointer m_Mesh2VTKMeshData;
-        vtkMeshData* m_VTKMeshData;
-      */
-      vtkMapper* m_Mapper;
+      Mesh( );
+      virtual ~Mesh( );
+
+    private:
+      // Purposely not implemented
+      Mesh( const Self& );
+      Self& operator=( const Self& );
+
+    protected:
+      vtkSmartPointer< vtkActor >          m_Actor;
+      vtkSmartPointer< vtkPolyDataMapper > m_Mapper;
     };
 
   } // ecapseman
 
 } // ecapseman
 
+#include <cpPlugins/Interface/Mesh.hxx>
+
 #endif // __CPPLUGINS__INTERFACE__MESH__H__
 
 // eof - $RCSfile$