X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FCutter.cxx;h=d0907b41e6429badcc34a3c3cffeb474bc9afb46;hb=d6f15d4cb764982e2b09060a9c0f38636891590c;hp=e0c80b40a7df160cf1741129105f833961058485;hpb=dba64a6906e88d6023b2e6c9632da9fd41bfeb53;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx b/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx index e0c80b4..d0907b4 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx @@ -13,11 +13,9 @@ cpPlugins::BasicFilters::Cutter:: Cutter( ) : Superclass( ) { - this->SetNumberOfInputs( 2 ); - this->SetNumberOfOutputs( 1 ); - this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 ); - - this->m_Parameters = this->m_DefaultParameters; + this->_AddInput( "InputMesh" ); + this->_AddInput( "InputFunction" ); + this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" ); } // ------------------------------------------------------------------------- @@ -32,9 +30,11 @@ _GenerateData( ) { // Get inputs cpPlugins::Interface::Mesh* mesh = - this->GetInput< cpPlugins::Interface::Mesh >( 0 ); + this->GetInput< cpPlugins::Interface::Mesh >( "InputMesh" ); cpPlugins::Interface::ImplicitFunction* function = - this->GetInput< cpPlugins::Interface::ImplicitFunction >( 1 ); + this->GetInput< cpPlugins::Interface::ImplicitFunction >( + "InputFunction" + ); if( function == NULL ) return( "Cutter: Input data 1 is not a valid implicit function." ); @@ -48,7 +48,7 @@ _GenerateData( ) // Execute filter cpPlugins::Interface::Mesh* out = - this->GetOutput< cpPlugins::Interface::Mesh >( 0 ); + this->GetOutput< cpPlugins::Interface::Mesh >( "Output" ); out->SetVTK( cutter->GetOutput( ) ); return( "" );