]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/cpPlugins
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / Cutter.cxx
index e0c80b40a7df160cf1741129105f833961058485..d0907b41e6429badcc34a3c3cffeb474bc9afb46 100644 (file)
@@ -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( "" );