-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PERF: Let ComputeImageExtremaFilter only compute min and max
No longer the mean, sigma, variance, sum, or sum of squares. Removed m_ThreadSum, m_SumOfSquares, and m_Count. Removed inheritance from StatisticsImageFilter (which computed the mean, sigma, variance, sum, and sum of squares for images without a mask). ComputeImageExtremaFilter is only being used in elastix by AdvancedImageToImageMetric and AdvancedMeanSquaresImageToImageMetric, and both of them only need to have the minimum and the maximum from ComputeImageExtremaFilter. A performance improvement of ~8 percent was observed, from more than 0.13 sec. (before this commit) to less than 0.12 sec., on a 8192x8192 image with mask. Without a mask, the computation appears even more than six times as fast as before, from more than 0.25 sec. (before this commit) to less than 0.04 sec. (after this commit), on a 16384x16384 image. Using Visual Studio 2022 (Release).
- Loading branch information
Showing
2 changed files
with
93 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters