X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FWorkspace.cxx;h=4c1fe1d298b2976faf57a21b5869bdfa1d0d365a;hb=adb38e2972e7c2e287e73c7b03db344807729219;hp=d749829b1aaf8f0ef2b3210ac0672c09b2570921;hpb=8b6eaedb25048704cb0a1a3fa1dd751c4fb25db4;p=cpPlugins.git diff --git a/lib/cpPlugins/Workspace.cxx b/lib/cpPlugins/Workspace.cxx index d749829..4c1fe1d 100644 --- a/lib/cpPlugins/Workspace.cxx +++ b/lib/cpPlugins/Workspace.cxx @@ -94,6 +94,28 @@ GetFilter( const std::string& name ) const return( f ); } +// ------------------------------------------------------------------------- +cpPlugins::DataObject* cpPlugins::Workspace:: +GetOutput( const std::string& filter, const std::string& output ) +{ + auto f = this->GetFilter( filter ); + if( f != NULL ) + return( f->GetOutput( output ) ); + else + return( NULL ); +} + +// ------------------------------------------------------------------------- +const cpPlugins::DataObject* cpPlugins::Workspace:: +GetOutput( const std::string& filter, const std::string& output ) const +{ + auto f = this->GetFilter( filter ); + if( f != NULL ) + return( f->GetOutput( output ) ); + else + return( NULL ); +} + // ------------------------------------------------------------------------- bool cpPlugins::Workspace:: HasFilter( const std::string& name ) const @@ -118,8 +140,7 @@ CreateFilter( // Get or create new filter from name if( !( this->m_Graph->HasVertexIndex( name ) ) ) { - ProcessObject::Pointer f = - this->m_Interface->Create( category, filter ); + ProcessObject::Pointer f = this->m_Interface->Create( category, filter ); if( f.IsNotNull( ) ) { if( f->IsInteractive( ) )