Skip to content

Commit

Permalink
ENH: Change ivar name in itk::IntermodesThresholdImageFilter
Browse files Browse the repository at this point in the history
Change the `m_MaxSmoothingIterations` ivar name in
`itk::IntermodesThresholdImageFilter`
to `m_MaximumSmoothingIterations`
so that the Set/Get methods match the ones previous to the change in
6dc4948.

Take advantage of the commit to fix a typo when printing the name of one
of the ivars in the `PrintSelf` method.
  • Loading branch information
jhlegarreta committed Mar 27, 2020
1 parent 81dc8b6 commit e864411
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class IntermodesThresholdImageFilter : public HistogramThresholdImageFilter<TInp
using CalculatorType = IntermodesThresholdCalculator<HistogramType, InputPixelType>;


itkSetMacro(MaxSmoothingIterations, SizeValueType);
itkGetMacro(MaxSmoothingIterations, SizeValueType);
itkSetMacro(MaximumSmoothingIterations, SizeValueType);
itkGetMacro(MaximumSmoothingIterations, SizeValueType);

/** Select whether midpoint (intermode=true) or minimum between
peaks is used. */
Expand All @@ -111,7 +111,7 @@ class IntermodesThresholdImageFilter : public HistogramThresholdImageFilter<TInp
IntermodesThresholdImageFilter()
{
auto calculator = CalculatorType::New();
calculator->SetMaximumSmoothingIterations(m_MaxSmoothingIterations);
calculator->SetMaximumSmoothingIterations(m_MaximumSmoothingIterations);
calculator->SetUseInterMode(m_UseInterMode);
Superclass::SetCalculator(calculator);
}
Expand All @@ -131,7 +131,7 @@ class IntermodesThresholdImageFilter : public HistogramThresholdImageFilter<TInp
GenerateData() override
{
auto calculator = static_cast<CalculatorType *>(this->Superclass::GetModifiableCalculator());
calculator->SetMaximumSmoothingIterations(m_MaxSmoothingIterations);
calculator->SetMaximumSmoothingIterations(m_MaximumSmoothingIterations);
calculator->SetUseInterMode(m_UseInterMode);
this->Superclass::GenerateData();
}
Expand All @@ -141,12 +141,12 @@ class IntermodesThresholdImageFilter : public HistogramThresholdImageFilter<TInp
PrintSelf(std::ostream & os, Indent indent) const override
{
Superclass::PrintSelf(os, indent);
os << indent << "MaxSmoothingIterations: " << m_MaxSmoothingIterations << std::endl;
os << indent << "UseIterMode: " << m_UseInterMode << std::endl;
os << indent << "MaximumSmoothingIterations: " << m_MaximumSmoothingIterations << std::endl;
os << indent << "UseInterMode: " << m_UseInterMode << std::endl;
}

private:
SizeValueType m_MaxSmoothingIterations{ 1000 };
SizeValueType m_MaximumSmoothingIterations{ 1000 };
bool m_UseInterMode{ true };
};

Expand Down

0 comments on commit e864411

Please sign in to comment.