]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/Cutter.cxx
Widget integration (step 6/6): Interactive architecture finished. Needs to be tested...
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / Cutter.cxx
index e3f1e2b98517296be15f5685f8fb3f8f28ef4c1a..d0907b41e6429badcc34a3c3cffeb474bc9afb46 100644 (file)
@@ -13,9 +13,9 @@ cpPlugins::BasicFilters::Cutter::
 Cutter( )
   : Superclass( )
 {
-  this->SetNumberOfInputs( 2 );
-  this->SetNumberOfOutputs( 1 );
-  this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 );
+  this->_AddInput( "InputMesh" );
+  this->_AddInput( "InputFunction" );
+  this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -30,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." );
 
@@ -46,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( "" );