Skip to content

Commit

Permalink
BUG: Set the maximum number of iterations to a non-zero value in test
Browse files Browse the repository at this point in the history
Set the `m_MaximumNumberOfIterations` `itk::MultiLabelSTAPLEImageFilter`
instance variable to a non-zero value in the corresponding test.

The value was set to 0 in commit e2511e7, following the default value
of the instance variable. However, this made it such that when updating
the filter no update was being actually performed due to the condition
in
https://github.com/InsightSoftwareConsortium/ITK/blob/e2511e7c0f0636439f08adc6b81abba18eceec33/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.hxx#L249

This also made the coverage decrease. Setting the variable to a non-zero
value restores the original test behavior and provides the same
confusion matrix results.
  • Loading branch information
jhlegarreta authored and hjmjohnson committed Sep 19, 2022
1 parent a639acc commit b64bc4f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ itkMultiLabelSTAPLEImageFilterTest(int, char *[])

ITK_TEST_EXPECT_TRUE(!filter->GetHasMaximumNumberOfIterations());

unsigned int maximumNumberOfIterations = 0;
unsigned int maximumNumberOfIterations = 100;
filter->SetMaximumNumberOfIterations(maximumNumberOfIterations);
ITK_TEST_SET_GET_VALUE(maximumNumberOfIterations, filter->GetMaximumNumberOfIterations());

Expand Down

0 comments on commit b64bc4f

Please sign in to comment.