// Get bounding box
double bbox[ 6 ];
- cpPlugins::Interface::Image* image =
- this->GetInput< cpPlugins::Interface::Image >( "Input" );
+ auto image = this->GetInputData( "Input" );
bool input_found = false;
if( image != NULL )
{
input_found = true;
} // fi
- cpPlugins::Interface::Mesh* mesh =
- this->GetInput< cpPlugins::Interface::Mesh >( "Input" );
+ auto mesh = this->GetInputData( "Input" );
if( mesh != NULL )
{
mesh->GetVTK< vtkPolyData >( )->GetBounds( bbox );
std::string cpPlugins::BasicFilters::MacheteFilter::
_GenerateData( )
{
- cpPlugins::Interface::Image* image =
- this->GetInput< cpPlugins::Interface::Image >( "Input" );
+ auto image = this->GetInputData( "Input" );
if( image != NULL )
return( this->_FromImage( image ) );
- cpPlugins::Interface::Mesh* mesh =
- this->GetInput< cpPlugins::Interface::Mesh >( "Input" );
+ auto mesh = this->GetInputData( "Input" );
if( mesh == NULL )
return( this->_FromMesh( mesh ) );
return( "MacheteFilter: No valid input." );
// -------------------------------------------------------------------------
std::string cpPlugins::BasicFilters::MacheteFilter::
-_FromImage( cpPlugins::Interface::Image* image )
+_FromImage( cpPlugins::Interface::DataObject* image )
{
itk::DataObject* itk_image = NULL;
std::string r = "";
// -------------------------------------------------------------------------
std::string cpPlugins::BasicFilters::MacheteFilter::
-_FromMesh( cpPlugins::Interface::Mesh* mesh )
+_FromMesh( cpPlugins::Interface::DataObject* mesh )
{
return( "" );
}
filter->SetOutsideValue( _TPixel( 0 ) );
filter->Update( );
- // Get output names
- auto pos_name = this->GetOutput< _TObj >( "PositiveOutput" )->GetName( );
- auto neg_name = this->GetOutput< _TObj >( "NegativeOutput" )->GetName( );
-
// Connect outputs (and correct their types and names)
- _TImage* pos_out = this->GetOutput< _TImage >( "PositiveOutput" );
+ _TObj* pos_out = this->GetOutputData( "PositiveOutput" );
if( pos_out == NULL )
{
this->_AddOutput< _TImage >( "PositiveOutput" );
- pos_out = this->GetOutput< _TImage >( "PositiveOutput" );
- pos_out->SetName( pos_name );
+ pos_out = this->GetOutputData( "PositiveOutput" );
} // fi
- _TImage* neg_out = this->GetOutput< _TImage >( "NegativeOutput" );
+ _TObj* neg_out = this->GetOutputData( "NegativeOutput" );
if( neg_out == NULL )
{
this->_AddOutput< _TImage >( "NegativeOutput" );
- neg_out = this->GetOutput< _TImage >( "NegativeOutput" );
- neg_out->SetName( neg_name );
+ neg_out = this->GetOutputData( "NegativeOutput" );
} // fi
// Assign outputs
- pos_out->SetITK< I >( filter->GetPositiveOutput( ) );
- neg_out->SetITK< I >( filter->GetNegativeOutput( ) );
+ pos_out->SetITK( filter->GetPositiveOutput( ) );
+ neg_out->SetITK( filter->GetNegativeOutput( ) );
return( "" );
}