Skip to content

Commit

Permalink
PERF: Use smaller (16x16) images in KullbackLeibler metric test
Browse files Browse the repository at this point in the history
The `KullbackLeiblerCompareHistogramImageToImageMetric` test appeared to be the
most time consuming test of ITK's test framework, taking more than 9 seconds on
Windows, on GitHub Actions. Originally it had test images of 100 x 100 pixels, with
commit de0f47a "Tests for the CompareHistogramImageToImageMetric
class and the KullbackLieblerCompareHistogramImageToImageMetric class", Luis Ibanez, 29 Dec 2003.
However, the same code coverage may be achieved with images of 16 x 16.
  • Loading branch information
N-Dekker authored and dzenanz committed Nov 1, 2022
1 parent 0c178ce commit dd0e02a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[])
ImageDimension = MovingImageType::ImageDimension
};

MovingImageType::SizeType size = { { 100, 100 } };
MovingImageType::SizeType size = { { 16, 16 } };
MovingImageType::IndexType index = { { 0, 0 } };
MovingImageType::RegionType region;
region.SetSize(size);
Expand Down

0 comments on commit dd0e02a

Please sign in to comment.