Commit ed90bd5f authored by Antoine Regimbeau's avatar Antoine Regimbeau

REFAC: minor modification following Gitlab thread

parent ab11c7e1
...@@ -105,13 +105,13 @@ protected: ...@@ -105,13 +105,13 @@ protected:
void PrintSelf(std::ostream& os, itk::Indent indent) const override; void PrintSelf(std::ostream& os, itk::Indent indent) const override;
void GenerateOutputInformation(void) override void GenerateOutputInformation(void) override
{ {
Superclass::GenerateOutputInformation(); Superclass::GenerateOutputInformation();
unsigned int sizeIn = this->GetInput()->GetNumberOfComponentsPerPixel(); unsigned int sizeIn = this->GetInput()->GetNumberOfComponentsPerPixel();
this->GetFunctor().SetInputComponents( sizeIn ); this->GetFunctor().SetInputComponents( sizeIn );
this->GetOutput()->SetNumberOfComponentsPerPixel( this->GetOutput()->SetNumberOfComponentsPerPixel(
this->GetFunctor().GetOutputSize () ); this->GetFunctor().GetOutputSize () );
} }
private: private:
ClampImageFilter(const Self&) = delete ; ClampImageFilter(const Self&) = delete ;
......
...@@ -61,9 +61,12 @@ void ...@@ -61,9 +61,12 @@ void
ClampImageFilter<TInputImage, TOutputImage> ClampImageFilter<TInputImage, TOutputImage>
::SetUpper(OutputPixelValueType val) ::SetUpper(OutputPixelValueType val)
{ {
m_Upper = val; if ( m_Upper != val )
this->GetFunctor().SetHighest( m_Upper ); {
this->Modified(); m_Upper = val;
this->GetFunctor().SetHighest( m_Upper );
this->Modified();
}
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment