]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/DataObject.h
XML IO added. Workspace singleton added to simplify pipeline definition and execution.
[cpPlugins.git] / lib / cpPlugins / Interface / DataObject.h
index aad997708c5a8df08947efb2065d76f2e1be2e06..d90f8e960da95f0dd1ce834ce7a3ecf442a4ca33 100644 (file)
@@ -1,19 +1,19 @@
 #ifndef __CPPLUGINS__INTERFACE__DATAOBJECT__H__
 #define __CPPLUGINS__INTERFACE__DATAOBJECT__H__
 
-#include <map>
-#include <string>
-#include <vtkObject.h>
-#include <vtkSmartPointer.h>
-#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/Object.h>
 
-#include <itkDataObject.h>
+#include <itkObject.h>
+#include <vtkSmartPointer.h>
+#include <vtkObject.h>
 
 namespace cpPlugins
 {
   namespace Interface
   {
+    // Some forward declarations
+    class ProcessObject;
+
     /**
      */
     class cpPlugins_Interface_EXPORT DataObject
@@ -26,15 +26,29 @@ namespace cpPlugins
       typedef itk::SmartPointer< const Self > ConstPointer;
 
     public:
+      itkNewMacro( Self );
       itkTypeMacro( DataObject, Object );
+      cpPlugins_Id_Macro( DataObject, "BasicObject" );
 
     public:
-      Object* GetSource( );
-      const Object* GetSource( ) const;
-      void SetSource( Object* src );
+      ProcessObject* GetSource( );
+      const ProcessObject* GetSource( ) const;
+      void SetSource( ProcessObject* src );
 
       void DisconnectPipeline( );
 
+      template< class T >
+        inline T* GetITK( );
+
+      template< class T >
+        inline const T* GetITK( ) const;
+
+      template< class T >
+        inline T* GetVTK( );
+
+      template< class T >
+        inline const T* GetVTK( ) const;
+
     protected:
       DataObject( );
       virtual ~DataObject( );
@@ -45,15 +59,17 @@ namespace cpPlugins
       Self& operator=( const Self& );
 
     protected:
-      itk::DataObject::Pointer     m_ITKObject;
+      itk::Object::Pointer         m_ITKObject;
       vtkSmartPointer< vtkObject > m_VTKObject;
-      Object::Pointer              m_Source;
+      ProcessObject*               m_Source;
     };
 
   } // ecapseman
 
 } // ecapseman
 
+#include <cpPlugins/Interface/DataObject.hxx>
+
 #endif // __CPPLUGINS__INTERFACE__DATAOBJECT__H__
 
 // eof - $RCSfile$