BinaryErodeImageFilter( )
: Superclass( )
{
- this->m_ClassName = "cpPlugins::BasicFilters::BinaryErodeImageFilter";
- this->m_ClassCategory = "ImageToImageFilter";
+ //this->m_ClassName = "cpPlugins::BasicFilters::BinaryErodeImageFilter";
+ //this->m_ClassCategory = "ImageToImageFilter";
this->SetNumberOfInputs( 1 );
this->SetNumberOfOutputs( 1 );
this->_MakeOutput< cpPlugins::Interface::Image >( 0 );
- using namespace cpPlugins::Interface;
- this->m_DefaultParameters.Configure( Parameters::Uint, "Radius" );
-
- this->m_DefaultParameters.SetValueAsUint( "Radius", 2 );
-
- this->m_Parameters = this->m_DefaultParameters;
+ this->m_Parameters->ConfigureAsUint( "Radius", 2 );
}
// -------------------------------------------------------------------------
inline std::string cpPlugins::BasicFilters::BinaryErodeImageFilter::
_RealGD( itk::DataObject* image )
{
- //typedef itk::Image<I, I::ImageDimension> ImageType;
- typedef itk::BinaryBallStructuringElement< I::PixelType, I::ImageDimension> StructuringElementType;
+ //typedef itk::Image<I, I::ImageDimension> ImageType;
+ typedef itk::BinaryBallStructuringElement< typename I::PixelType, I::ImageDimension> StructuringElementType;
typedef itk::BinaryErodeImageFilter< I, O, StructuringElementType > _F;
typedef typename _F::RadiusType _RT;
// Get parameters
_RT rad_val;
- rad_val.Fill( this->m_Parameters.GetValueAsUint( "Radius" ) );
+ rad_val.Fill( this->m_Parameters->GetUint( "Radius" ) );
// Configure filter
-
- StructuringElementType structuringElement;
- structuringElement.SetRadius(rad_val);
- structuringElement.CreateStructuringElement();
-
+ StructuringElementType structuringElement;
+ structuringElement.SetRadius( rad_val );
+ structuringElement.CreateStructuringElement( );
_F* filter = this->_CreateITK< _F >( );
filter->SetInput( dynamic_cast< I* >( image ) );
- filter->SetKernel(structuringElement);
+ filter->SetKernel( structuringElement );
filter->Update( );
// Connect output