Last Tuesday I implemented another modern C++ range of iterators: ImageRange should support iterating over all pixels of an image buffer. (Still work in progress – WIP.)
Now I wonder if I chose the right accessor to access the pixels of the image. I chose the one returned by itk::Image::GetPixelAccessor(). My implementation of iterator::operator*() retrieves a reference to the pixel pointed to by
iterator::m_CurrentPixel by doing m_PixelAccessor.Get(*m_CurrentPixel). Is that OK? It seems to me that this approach does not support vector images (
itk::VectorImage). The accessor returned by itk::VectorImage::GetPixelAccessor() appears incompatible with the one from
Should I use ITK’s NeighborhoodAccessor instead, as in ShapedImageNeighborhoodRange?