]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/ProcessObject.h
XML IO added. Workspace singleton added to simplify pipeline definition and execution.
[cpPlugins.git] / lib / cpPlugins / Interface / ProcessObject.h
index 6f388143cbb376cd837b207f8aaf64acf33ab167..6578beb35e0b533d51d508dbbb88b934d818dda2 100644 (file)
@@ -1,33 +1,29 @@
 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
 
-#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
+#include <set>
 
-#include <map>
-#include <vector>
-
-#include <cpPlugins/Interface/Config.h>
-#include <cpPlugins/Interface/Object.h>
 #include <cpPlugins/Interface/DataObject.h>
 #include <cpPlugins/Interface/Parameters.h>
 
-#ifdef cpPlugins_Interface_QT4
-class QWidget;
-#else
-typedef char QWidget;
-#endif // cpPlugins_Interface_QT4
-
 #include <itkProcessObject.h>
-
 #include <vtkSmartPointer.h>
 #include <vtkAlgorithm.h>
 
+// Some forward declarations
 class vtkRenderWindowInteractor;
+#ifdef cpPlugins_Interface_QT4
+class QWidget;
+#else
+typedef char QWidget;
+#endif // cpPlugins_Interface_QT4
 
 namespace cpPlugins
 {
   namespace Interface
   {
+    // Some forward declarations
+    class Plugins;
 #ifdef cpPlugins_Interface_QT4
     class ParametersQtDialog;
 #else
@@ -46,6 +42,7 @@ namespace cpPlugins
       typedef itk::SmartPointer< const Self > ConstPointer;
 
       typedef Parameters TParameters;
+      typedef std::set< vtkRenderWindowInteractor* > TInteractors;
 
       enum DialogResult
       {
@@ -56,22 +53,30 @@ namespace cpPlugins
 
     public:
       itkTypeMacro( ProcessObject, Object );
-      cpPlugins_Id_Macro(
-        cpPlugins::Interface::ProcessObject, "BaseObject"
-        );
+      cpPlugins_Id_Macro( ProcessObject, "BaseObject" );
+
+      itkBooleanMacro( Interactive );
+
+      itkGetConstObjectMacro( Parameters, TParameters );
+      itkGetObjectMacro( Parameters, TParameters );
+      itkGetConstMacro( Plugins, const Plugins* );
+      itkGetMacro( Plugins, Plugins* );
+      itkGetConstMacro( Interactive, bool );
+
+      itkSetObjectMacro( Plugins, Plugins );
+      itkSetMacro( Interactive, bool );
 
     public:
       // To impact pipeline
       virtual void Modified( ) const;
 
-      virtual TParameters* GetParameters( );
-      virtual const TParameters* GetParameters( ) const;
+      virtual void GetInputsNames( std::set< std::string >& names ) const;
+      virtual void GetOutputsNames( std::set< std::string >& names ) const;
 
-      virtual unsigned int GetNumberOfInputs( ) const;
-      virtual unsigned int GetNumberOfOutputs( ) const;
-
-      virtual std::vector< std::string > GetInputsNames( ) const;
-      virtual std::vector< std::string > GetOutputsNames( ) const;
+      virtual bool SetOutputObjectName(
+        const std::string& new_object_name,
+        const std::string& output_name
+        );
 
       virtual void SetInput( const std::string& id, DataObject* dobj );
 
@@ -133,12 +138,21 @@ namespace cpPlugins
 
       Parameters::Pointer m_Parameters;
       ParametersQtDialog* m_ParametersDialog;
+      TInteractors        m_Interactors;
+      Plugins* m_Plugins;
+      bool m_Interactive;
 
       typedef std::map< std::string, DataObject::Pointer > _TDataContainer;
       _TDataContainer m_Inputs;
       _TDataContainer m_Outputs;
+      std::map< std::string, std::string > m_OutputObjectsNames;
     };
 
+    /**
+     * Plugin provider
+     */
+    CPPLUGINS_PROVIDER_HEADER( ProcessObject );
+
   } // ecapseman
 
 } // ecapseman