InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.38k stars 661 forks source link

ENH: FlatStructuringElement and ShapedNeighborhoodIterator Interop #4523

Closed dzenanz closed 3 months ago

dzenanz commented 4 months ago

Allow interoperability of FlatStructuringElement and ShapedNeighborhoodIterator to allow compilation of the following code:

using SE2Type = itk::FlatStructuringElement<2>;
SE2Type::RadiusType r2 = SE2Type::RadiusType::Filled(5);
SE2Type k2 = SE2Type::Ball(r2);

itk::ShapedNeighborhoodIterator<TImage> iterator(r2, image, image->GetBufferedRegion());
iterator.CreateActiveListFromNeighborhood(k2); // this now compiles

PR Checklist