Use ImageRegionIterator without "WithIndex" in *.hxx files #5848
Draft
N-Dekker wants to merge 3 commits intoInsightSoftwareConsortium:mainfrom
Draft
Use ImageRegionIterator without "WithIndex" in *.hxx files #5848N-Dekker wants to merge 3 commits intoInsightSoftwareConsortium:mainfrom
*.hxx files #5848N-Dekker wants to merge 3 commits intoInsightSoftwareConsortium:mainfrom
Conversation
*.hxx files
ImageToImageMetric uses ImageRegionConstIteratorWithIndex internally.
Paved the way to remove `ImageRegionIteratorWithIndex` uses from various `itk*.hxx` files.
Replaced `ImageRegionIteratorWithIndex` with `ImageRegionIterator`, and replaced `ImageRegionConstIteratorWithIndex` with `ImageRegionConstIterator`, in cases where the index of the iterator was not used. When the index is not needed, `ImageRegionIterator` and `ImageRegionConstIterator` are _much_ faster than the corresponding iterators "with index"! Aims to speed up the following filters: - BinomialBlurImageFilter - EigenAnalysis2DImageFilter - GradientRecursiveGaussianImageFilter - HessianRecursiveGaussianImageFilter - HoughTransform2DLinesImageFilter - VoronoiPartitioningImageFilter - VoronoiSegmentationImageFilter - VoronoiSegmentationImageFilterBase - VoronoiSegmentationRGBImageFilter As well as: - GradientDifferenceImageToImageMetric - MetaImageConverter - PeakSignalToNoiseRatioCalculator - RobustAutomaticThresholdCalculator Found by regular expression ` ImageRegionIteratorWithIndex(?!.*\.GetIndex\(\))` and ` ImageRegionConstIteratorWithIndex(?!.*\.GetIndex\(\))`.
ef2e670 to
4df6928
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaced
ImageRegionIteratorWithIndexwithImageRegionIterator, and replacedImageRegionConstIteratorWithIndexwithImageRegionConstIterator, in caseswhere the index of the iterator was not used.
When the index is not needed,
ImageRegionIteratorandImageRegionConstIteratorare much faster than the corresponding iterators "with index"!
Aims to speed up the following filters:
As well as: