]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Workspace.h
..
[cpPlugins.git] / lib / cpPlugins / Interface / Workspace.h
index 1e6e6e21f4d42f20cb43e752aae68143c8de2db3..7d76c05b13a4dbde315159d15aa677c965e2793f 100644 (file)
@@ -24,6 +24,7 @@ namespace cpPlugins
       typedef itk::SmartPointer< Self >       Pointer;
       typedef itk::SmartPointer< const Self > ConstPointer;
 
+      typedef cpPlugins::BaseObjects::DataObject    TDataObject;
       typedef cpPlugins::BaseObjects::ProcessObject TFilter;
       typedef cpPlugins::BaseObjects::Widget        TWidget;
       typedef cpPlugins::Interface::Plugins         TPlugins;
@@ -37,10 +38,14 @@ namespace cpPlugins
       */
 
     public:
-      itkNewMacro( Self );
       itkTypeMacro( Workspace, itk::Object );
 
     public:
+      // Factory methods
+      static Pointer New( );
+      virtual itk::LightObject::Pointer CreateAnother( ) const cpPlugins_OVERRIDE;
+      Pointer Clone( ) const;
+
       // Workspace IO
       void Load( const std::string& fname );
       void Save( const std::string& fname ) const;
@@ -71,36 +76,6 @@ namespace cpPlugins
       // Interactors
       void AddInteractor( vtkRenderWindowInteractor* iren );
 
-      // Exposed ports
-      /* TODO
-         const TExposedPorts& GetExposedInputs( ) const;
-         const TExposedPorts& GetExposedOutputs( ) const;
-         cpPlugins::BaseObjects::DataObject* GetExposedOutput(
-         const std::string& name
-         );
-         const cpPlugins::BaseObjects::DataObject* GetExposedOutput(
-         const std::string& name
-         ) const;
-         bool ExposeInput(
-         const std::string& name,
-         const std::string& filter, const std::string& filter_input
-         );
-         bool ExposeOutput(
-         const std::string& name,
-         const std::string& filter, const std::string& filter_output
-         );
-         void HideInput( const std::string& name );
-         void HideOutput( const std::string& name );
-         bool RenameExposedInput(
-         const std::string& old_name,
-         const std::string& new_name
-         );
-         bool RenameExposedOutput(
-         const std::string& old_name,
-         const std::string& new_name
-         );
-      */
-
       // Connection management
       bool Connect(
         const std::string& origin_filter,
@@ -108,6 +83,11 @@ namespace cpPlugins
         const std::string& destination_filter,
         const std::string& destination_input
         );
+      bool Connect(
+        TDataObject* input,
+        const std::string& destination_filter,
+        const std::string& destination_input
+        );
       bool Disconnect(
         const std::string& origin_filter,
         const std::string& origin_output,