I think it would be great! it would make easier implementing MathematicalTopology methods in ITK. For example the neighborhood of a pixel could be 26 (fully connected), 18, or 6 in 3D. 8 for fully connected in 2D or 4. Also the approach of having indices stored in a vector could reduce confusion (don’t having to dig in the iterator what is the order at visiting pixels) at creating look-up tables for speed computation of some properties of the neighborhood IsSimple, IsConnected, IsIsthmus, IsEndPoint,… depending on the topology/neighborhood.

I like it, the drawback of maintaining the vector of indices doesn’t sounds as bad for the full control it gives.

Maybe I would recommend that the vector is ordered, for consistency, a std::sort(relativeIndices) in the `GenerateXXX`

helpers methods will do.

+1!