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" );
}
// -------------------------------------------------------------------------
{
// 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." );
// Execute filter
cpPlugins::Interface::Mesh* out =
- this->GetOutput< cpPlugins::Interface::Mesh >( 0 );
+ this->GetOutput< cpPlugins::Interface::Mesh >( "Output" );
out->SetVTK( cutter->GetOutput( ) );
return( "" );