X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FCutter.cxx;h=a0b051d16c7d173977a9894edc5458f17f9c2b62;hb=1bf710541f1f708f9000096a8d516596bf009d6d;hp=d0907b41e6429badcc34a3c3cffeb474bc9afb46;hpb=2eaf38cfdcbd2cfb0cc323dad6ded6bbeb436edf;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx b/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx index d0907b4..a0b051d 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx @@ -13,9 +13,9 @@ cpPlugins::BasicFilters::Cutter:: Cutter( ) : Superclass( ) { - this->_AddInput( "InputMesh" ); - this->_AddInput( "InputFunction" ); - this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" ); + this->_AddInput( "InputMesh", true ); + this->_AddInput( "InputFunction", true ); + this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" ); } // ------------------------------------------------------------------------- @@ -29,10 +29,9 @@ std::string cpPlugins::BasicFilters::Cutter:: _GenerateData( ) { // Get inputs - cpPlugins::Interface::Mesh* mesh = - this->GetInput< cpPlugins::Interface::Mesh >( "InputMesh" ); - cpPlugins::Interface::ImplicitFunction* function = - this->GetInput< cpPlugins::Interface::ImplicitFunction >( + auto mesh = this->GetInputData< cpPlugins::Interface::Mesh >( "InputMesh" ); + auto function = + this->GetInputData< cpPlugins::Interface::ImplicitFunction >( "InputFunction" ); if( function == NULL ) @@ -47,8 +46,7 @@ _GenerateData( ) cutter->Update( ); // Execute filter - cpPlugins::Interface::Mesh* out = - this->GetOutput< cpPlugins::Interface::Mesh >( "Output" ); + auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" ); out->SetVTK( cutter->GetOutput( ) ); return( "" );