X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FcpPluginsMeshFilters%2FAppendMeshesFilter.cxx;h=b3fd5a6f45c8cdc2c1c36ac8bf5fb135e5ecd2d8;hb=733108d258a27799df875ceda2d84c3cafea64d3;hp=4029c9c9d249895dc36f3d890e59f6066265b5be;hpb=e0389395c168c78560e79c92bcd021a09c3daf30;p=cpPlugins.git diff --git a/plugins/cpPluginsMeshFilters/AppendMeshesFilter.cxx b/plugins/cpPluginsMeshFilters/AppendMeshesFilter.cxx index 4029c9c..b3fd5a6 100644 --- a/plugins/cpPluginsMeshFilters/AppendMeshesFilter.cxx +++ b/plugins/cpPluginsMeshFilters/AppendMeshesFilter.cxx @@ -24,15 +24,18 @@ cpPluginsMeshFilters::AppendMeshesFilter:: } // ------------------------------------------------------------------------- -std::string cpPluginsMeshFilters::AppendMeshesFilter:: +void cpPluginsMeshFilters::AppendMeshesFilter:: _GenerateData( ) { - auto m0 = this->GetInputData( "Input0" )->GetVTK< vtkPolyData >( ); - auto m1 = this->GetInputData( "Input1" )->GetVTK< vtkPolyData >( ); - auto m2 = this->GetInputData( "Input2" ); - auto m3 = this->GetInputData( "Input3" ); - auto m4 = this->GetInputData( "Input4" ); - auto m5 = this->GetInputData( "Input5" ); + auto m0 = this->GetInputData< vtkPolyData >( "Input0" ); + auto m1 = this->GetInputData< vtkPolyData >( "Input1" ); + auto m2 = this->GetInput( "Input2" ); + auto m3 = this->GetInput( "Input3" ); + auto m4 = this->GetInput( "Input4" ); + auto m5 = this->GetInput( "Input5" ); + + if( m0 == NULL || m1 == NULL ) + this->_Error( "Invalid inputs." ); auto filter = this->_CreateVTK< vtkAppendPolyData >( ); filter->AddInputData( m0 ); @@ -43,8 +46,7 @@ _GenerateData( ) if( m5 != NULL ) filter->AddInputData( m5->GetVTK< vtkPolyData >( ) ); filter->Update( ); - this->GetOutputData( "Output" )->SetVTK( filter->GetOutput( ) ); - return( "" ); + this->GetOutput( "Output" )->SetVTK( filter->GetOutput( ) ); } // eof - $RCSfile$