COMP: Add itkImageRegionConstIteratorWithIndex.h include for ITK6 compat#6
Merged
acsenrafilho merged 1 commit intoJun 11, 2026
Conversation
ITK upstream main (v6 prep) has trimmed transitive includes. BVeR.cxx uses `itk::ImageRegionConstIteratorWithIndex` but did not include its declaring header directly; under ITK 5.x the header was transitively pulled in via one of the other ITK includes, but ITK upstream main now produces: BVeR.cxx:185:14: error: 'ImageRegionConstIteratorWithIndex' is not a member of 'itk' Add the explicit include. Backward compatible with ITK 5.x (the header has always existed under that name).
acsenrafilho
approved these changes
Jun 11, 2026
acsenrafilho
left a comment
Member
There was a problem hiding this comment.
Thank you for the review. I really appreciate the help here. All good!
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.
Add
#include "itkImageRegionConstIteratorWithIndex.h"toBVeR/BVeR.cxxso the extension builds against ITK upstream main (v6 prep).Why this is needed
ITK upstream main has trimmed transitive includes.
BVeR.cxx:185usesitk::ImageRegionConstIteratorWithIndexbut did not include its declaring header directly. Under ITK 5.x this was transitively pulled in via one of the other ITK includes; under ITK main this fails:Adding the explicit include is fully backward compatible with ITK 5.x (the header has always existed under that name).
Tracking
Part of the Slicer ITK upstream-main (v6) transition tracked at
Slicer/Slicer#9149. The same
transitive-include cleanup pattern was fixed in
Slicer/Slicercore (2 sites)and
ANTsX/ANTsmaster (Utilities/itkSurfaceImageCurvature.h).