X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2FPipelineEditor%2FPipelineEditor.cxx;h=65fb82b7f816cd9c8403844a6c5e05b4bae47b7d;hb=e6f0b27971bbd8175ec5e8615e90b8fba9fa07c9;hp=b61cd14cbc5155b9c2e830ac8b5a6b216893d3af;hpb=b2bb173d0feca93ca889a80280a1f5d2a87de402;p=cpPlugins.git diff --git a/appli/PipelineEditor/PipelineEditor.cxx b/appli/PipelineEditor/PipelineEditor.cxx index b61cd14..65fb82b 100644 --- a/appli/PipelineEditor/PipelineEditor.cxx +++ b/appli/PipelineEditor/PipelineEditor.cxx @@ -3,8 +3,8 @@ #include +#include #include -#include #include #include @@ -84,37 +84,22 @@ _ShowFilterOutput( this->_ExecFilter( filter_name ); // Get output - auto filter = this->m_Workspace.GetFilter( filter_name ); - if( filter != NULL ) + auto output = this->m_Workspace.GetOutput( filter_name, output_name ); + if( output == NULL ) { - auto id = filter->GetOutputData< vtkImageData >( output_name ); - auto md = filter->GetOutputData< vtkPolyData >( output_name ); - if( id != NULL ) - { - this->_Block( ); - this->m_UI->Viewer->Clear( ); - this->m_UI->Viewer->SetMainImage( id ); - this->_UnBlock( ); - } - else if( md != NULL ) - { - this->_Block( ); - this->m_UI->Viewer->AddMesh( md ); - this->_UnBlock( ); - } - else - QMessageBox::critical( - this, - QMessageBox::tr( "Error showing data" ), - QMessageBox::tr( "No known VTK conversion!" ) - ); - } - else QMessageBox::critical( this, QMessageBox::tr( "Error showing data" ), - QMessageBox::tr( "Unknown filter." ) + QMessageBox::tr( "Unknown port name." ) ); + return; + + } // fi + + // Create and associate actor + this->_Block( ); + this->m_UI->Viewer->AddActor( output->GetVTKActor( ) ); + this->_UnBlock( ); } // ------------------------------------------------------------------------- @@ -146,34 +131,35 @@ _PropertiesFilterOutput( const std::string& filter_name, const std::string& output_name ) { - // Get output - auto filter = this->m_Workspace.GetFilter( filter_name ); - if( filter != NULL ) - { - auto output = filter->GetOutputData< vtkPolyData >( output_name ); - if( output != NULL ) - { - auto actor = this->m_UI->Viewer->GetActor( output ); - if( actor != NULL ) - { - cpExtensions::QT::PropertyWidget* wdg = - new cpExtensions::QT::PropertyWidget( NULL ); - wdg->SetProp( actor ); - wdg->SetRenderWindow( - this->m_UI->Viewer->GetInteractor( 3 )->GetRenderWindow( ) - ); - wdg->show( ); - - } // fi - } - else - QMessageBox::critical( - this, - QMessageBox::tr( "Error showing data" ), - QMessageBox::tr( "No known VTK conversion!" ) - ); + /* TODO + auto filter = this->m_Workspace.GetFilter( filter_name ); + if( filter != NULL ) + { + auto output = filter->GetOutputData< vtkPolyData >( output_name ); + if( output != NULL ) + { + auto actor = this->m_UI->Viewer->GetActor( output ); + if( actor != NULL ) + { + cpExtensions::QT::PropertyWidget* wdg = + new cpExtensions::QT::PropertyWidget( NULL ); + wdg->SetProp( actor ); + wdg->SetRenderWindow( + this->m_UI->Viewer->GetInteractor( 3 )->GetRenderWindow( ) + ); + wdg->show( ); - } // fi + } // fi + } + else + QMessageBox::critical( + this, + QMessageBox::tr( "Error showing data" ), + QMessageBox::tr( "No known VTK conversion!" ) + ); + + } // fi + */ } // eof - $RCSfile$