: Superclass( )
{
this->_AddInput( "Input" );
- this->_MakeOutput< cpPlugins::Interface::Image >( "Output" );
+ this->_AddOutput< cpPlugins::Interface::Image >( "Output" );
- this->m_Parameters->ConfigureAsUint( "Axis", 0 );
- this->m_Parameters->ConfigureAsInt( "Slice", 0 );
+ this->m_Parameters->ConfigureAsUint( "Axis" );
+ this->m_Parameters->ConfigureAsInt( "Slice" );
+
+ this->m_Parameters->SetUint( "Axis", 0 );
+ this->m_Parameters->SetInt( "Slice", 0 );
}
// -------------------------------------------------------------------------
std::string cpPlugins::BasicFilters::ExtractSliceImageFilter::
_GenerateData( )
{
- cpPlugins::Interface::Image* image =
- this->GetInput< cpPlugins::Interface::Image >( "Input" );
- if( image == NULL )
- return( "ExtractSliceImageFilter: No input image." );
-
+ auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
itk::DataObject* itk_image = NULL;
std::string r = "";
/*
filter->Update( );
// Connect output
- cpPlugins::Interface::Image* out =
- this->GetOutput< cpPlugins::Interface::Image >( "Output" );
- if( out != NULL )
- {
- out->SetITK< O >( filter->GetOutput( ) );
- return( "" );
- }
- else
- return( "ExtractSliceImageFilter: output not correctly created." );
+ auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" );
+ out->SetITK( filter->GetOutput( ) );
+ return( "" );
}
// eof - $RCSfile$