[Insight-developers] recomendations for fast access to list of
offsets
Richard Beare
richard.beare at gmail.com
Sun Jul 2 20:27:45 EDT 2006
Hi,
I have a filter that will sweep lines of various orientations across
an image. The lines will change angles between passes. I represent the
line as an array of offsets from the starting point, and this
representation is computed once for each sweep. The idea is to copy
the pixel locations to a buffer for processing, and then copy them
back when I'm done, which tends to simplify the interface to the core
computational code and often improves cache performance when the
buffered data is accessed lots of times.
So what is the recommended way of accessing a bunch of pixels that
aren't necessarily in one of the standard orderings? I've experimented
with image.GetPixel() to get things working, which the documentation
says is slow, and it shows signs of being a significant overhead. I've
also toyed with using += operators with image region iterators, but it
doesn't seem to be legal.
Any recommendations?
Thanks
More information about the Insight-developers
mailing list