Skip to content

Commit

Permalink
BUG: Consistency of enforcing m_ShrinkFactors > 1
Browse files Browse the repository at this point in the history
The behavior of setting individual m_ShrinkFactor elements
should be the same as setting from an array of shrinkFactors.
  • Loading branch information
hjmjohnson committed Dec 20, 2024
1 parent f0eadd9 commit 4699cf6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ ShrinkImageFilter<TInputImage, TOutputImage>::SetShrinkFactor(unsigned int i, un
}

this->Modified();
m_ShrinkFactors[i] = factor;
if (m_ShrinkFactors[i] < 1)
{
m_ShrinkFactors[i] = 1;
}
else
{
m_ShrinkFactors[i] = factor;
}
}


Expand Down

0 comments on commit 4699cf6

Please sign in to comment.