X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FOtsuThresholdImageFilter.cxx;h=65df9e012f352533234122fd9d7cdbfca72eb908;hb=8db7a40f2ef8530457959a51a4d2a7f012d0b7a3;hp=de924a67b9da78b90c68a2de89ef1984a8cf2a84;hpb=d1d816d1eaf980d5cd266798b8f7a0bbb089a383;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx index de924a6..65df9e0 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/OtsuThresholdImageFilter.cxx @@ -8,22 +8,13 @@ cpPlugins::BasicFilters::OtsuThresholdImageFilter:: 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 ); } // ------------------------------------------------------------------------- @@ -71,10 +62,9 @@ _RealGD( itk::DataObject* image ) 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 >( );