MarchingCubes( )
: Superclass( )
{
- this->SetNumberOfInputs( 1 );
- this->SetNumberOfOutputs( 1 );
- this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 );
+ this->_AddInput( "Input" );
+ this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
this->m_Parameters->ConfigureAsRealList( "Thresholds" );
}
_GenerateData( )
{
// Get input
- cpPlugins::Interface::Image* image =
- this->GetInput< cpPlugins::Interface::Image >( 0 );
+ auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
if( image == NULL )
return( "MarchingCubes: Input data is not a valid image." );
vtkImageData* vtk_image = image->GetVTK< vtkImageData >( );
if( vtk_image == NULL )
return( "MarchingCubes: Input does not have a valid VTK conversion." );
- std::vector< double > values;
- this->m_Parameters->GetRealList( values, "Thresholds" );
+ std::vector< double > values =
+ this->m_Parameters->GetRealList( "Thresholds" );
vtkPolyData* pd = NULL;
if( vtk_image->GetDataDimension( ) == 2 )
{
return( "MarchingCubes: Input data does not have a valid dimension." );
// Execute filter
- cpPlugins::Interface::Mesh* out =
- this->GetOutput< cpPlugins::Interface::Mesh >( 0 );
+ auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" );
out->SetVTK( pd );
return( "" );
}