X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FWorkspace.h;h=b4c464124765668b64e0508fdc10dd45c679cdf3;hb=1b600247da314fe62d007ca8a0ce24d0006931f4;hp=92315d71fb8c0116b45d1c4199584fbccc425f01;hpb=3ac87d29be6f3484efcfb3bcc204b7f99faa1eed;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Workspace.h b/lib/cpPlugins/Interface/Workspace.h index 92315d7..b4c4641 100644 --- a/lib/cpPlugins/Interface/Workspace.h +++ b/lib/cpPlugins/Interface/Workspace.h @@ -11,11 +11,19 @@ // Some forward declarations class QWidget; +class vtkRenderWindowInteractor; namespace cpPlugins { namespace Interface { + // Some forward declarations +#ifdef cpPlugins_Interface_QT4 + class SimpleMPRWidget; +#else // cpPlugins_Interface_QT4 + typedef char SimpleMPRWidget; +#endif // cpPlugins_Interface_QT4 + /** \brief A complex pipeline */ class cpPlugins_Interface_EXPORT Workspace @@ -62,18 +70,31 @@ namespace cpPlugins TFilter* GetFilter( const std::string& name ); const TFilter* GetFilter( const std::string& name ) const; bool HasFilter( const std::string& name ) const; - bool CreateFilter( const std::string& filter, const std::string& name ); + TFilter* CreateFilter( + const std::string& filter, const std::string& name + ); bool RenameFilter( const std::string& old_name, const std::string& new_name ); void RemoveFilter( const std::string& name ); + // Widgets management + vtkRenderWindowInteractor* GetSingleInteractor( ); + const vtkRenderWindowInteractor* GetSingleInteractor( ) const; + void SetSingleInteractor( vtkRenderWindowInteractor* interactor ); + + SimpleMPRWidget* GetMPRViewer( ); + const SimpleMPRWidget* GetMPRViewer( ) const; + void SetMPRViewer( SimpleMPRWidget* wdg ); + // Connection management bool Connect( const std::string& orig_filter, const std::string& dest_filter, const std::string& output_name, const std::string& input_name ); - bool Connect( TData* input_object, const std::string& exposed_port ); + bool Connect( + TData::Pointer* input_object, const std::string& exposed_port + ); void RemoveConnection( const std::string& dest_filter, const std::string& input_name ); @@ -111,17 +132,20 @@ namespace cpPlugins const TData* GetExposedOutput( const std::string& name ) const; // Pipeline execution - std::string Execute( QWidget* p = NULL ); - std::string Execute( const std::string& name, QWidget* p = NULL ); + std::string Execute( ); + std::string Execute( const std::string& name ); protected: // Plugins interface TPlugins* m_Plugins; // Processing graph - typename TGraph::Pointer m_Graph; + TGraph::Pointer m_Graph; TExposedPorts m_ExposedInputPorts; TExposedPorts m_ExposedOutputPorts; + + vtkSmartPointer< vtkRenderWindowInteractor > m_SingleInteractor; + SimpleMPRWidget* m_MPRViewer; }; } // ecapseman