Skip to content

COMP: Add itkImageRegionConstIteratorWithIndex.h include for ITK6 compat#6

Merged
acsenrafilho merged 1 commit into
CSIM-Toolkits:mainfrom
hjmjohnson:itk6-add-iterator-header
Jun 11, 2026
Merged

COMP: Add itkImageRegionConstIteratorWithIndex.h include for ITK6 compat#6
acsenrafilho merged 1 commit into
CSIM-Toolkits:mainfrom
hjmjohnson:itk6-add-iterator-header

Conversation

@hjmjohnson

Copy link
Copy Markdown
Contributor

Add #include "itkImageRegionConstIteratorWithIndex.h" to BVeR/BVeR.cxx so the extension builds against ITK upstream main (v6 prep).

Why this is needed

ITK upstream main has trimmed transitive includes. BVeR.cxx:185 uses itk::ImageRegionConstIteratorWithIndex but 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:

BVeR.cxx:185:14: error: 'ImageRegionConstIteratorWithIndex' is not a member of 'itk'; did you mean 'ImageLinearConstIteratorWithIndex'?

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/Slicer core (2 sites)
and ANTsX/ANTs master (Utilities/itkSurfaceImageCurvature.h).

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).
@hjmjohnson hjmjohnson marked this pull request as ready for review May 11, 2026 13:50

@acsenrafilho acsenrafilho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review. I really appreciate the help here. All good!

@acsenrafilho acsenrafilho merged commit 8a82c02 into CSIM-Toolkits:main Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants