OtsuThresholdImageFilter( )
: Superclass( )
{
- this->m_ClassName = "cpPlugins::BasicFilters::OtsuThresholdImageFilter";
- 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, "NumberOfHistogramBins"
- );
- this->m_DefaultParameters.Configure( Parameters::Real, "InsideValue" );
- this->m_DefaultParameters.Configure( Parameters::Real, "OutsideValue" );
- this->m_DefaultParameters.SetValueAsUint( "NumberOfHistogramBins", 100 );
- this->m_DefaultParameters.SetValueAsReal( "InsideValue", 255 );
- this->m_DefaultParameters.SetValueAsReal( "OutsideValue", 0 );
- this->m_Parameters = this->m_DefaultParameters;
+ this->m_Parameters->ConfigureAsUint( "NumberOfHistogramBins", 100 );
+ this->m_Parameters->ConfigureAsUint( "InsideValue", 255 );
+ this->m_Parameters->ConfigureAsUint( "OutsideValue", 0 );
}
// -------------------------------------------------------------------------
typedef typename O::PixelType _OP;
// Get parameters
- unsigned int bins =
- this->m_Parameters.GetValueAsUint( "NumberOfHistogramBins" );
- _OP in_val = _OP( this->m_Parameters.GetValueAsReal( "InsideValue" ) );
- _OP out_val = _OP( this->m_Parameters.GetValueAsReal( "OutsideValue" ) );
+ unsigned int bins = this->m_Parameters->GetUint( "NumberOfHistogramBins" );
+ _OP in_val = _OP( this->m_Parameters->GetUint( "InsideValue" ) );
+ _OP out_val = _OP( this->m_Parameters->GetUint( "OutsideValue" ) );
// Configure filter
_F* filter = this->_CreateITK< _F >( );