Cutter( )
: Superclass( )
{
- this->SetNumberOfInputs( 2 );
- this->SetNumberOfOutputs( 1 );
- this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 );
+ this->_AddInput( "InputMesh", true );
+ this->_AddInput( "InputFunction", true );
+ this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
}
// -------------------------------------------------------------------------
_GenerateData( )
{
// Get inputs
- cpPlugins::Interface::Mesh* mesh =
- this->GetInput< cpPlugins::Interface::Mesh >( 0 );
- cpPlugins::Interface::ImplicitFunction* function =
- this->GetInput< cpPlugins::Interface::ImplicitFunction >( 1 );
+ auto mesh = this->GetInputData< cpPlugins::Interface::Mesh >( "InputMesh" );
+ auto function =
+ this->GetInputData< cpPlugins::Interface::ImplicitFunction >(
+ "InputFunction"
+ );
if( function == NULL )
return( "Cutter: Input data 1 is not a valid implicit function." );
cutter->Update( );
// Execute filter
- cpPlugins::Interface::Mesh* out =
- this->GetOutput< cpPlugins::Interface::Mesh >( 0 );
+ auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" );
out->SetVTK( cutter->GetOutput( ) );
return( "" );