[Insight-developers] VectorImage: and contiguous memory assumption

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 23 20:49:05 EDT 2011


Brad, Nick,

It turned out that I was wrong about the internal
memory organization of the VectorImage class.

Looking closely at the code, particularly the
GetPixel, SetPixel methods of this class,
and after checking with Karthik (who actually
implemented this class), it turns out that the
memory organization is actually


1) All the components of pixel 1, followed by
2) All the components of pixel 2, followed by
3) All the components of pixel 3, followed by
4) All the components of pixel 4, followed by

and so on...


Instead of what I wrongly thought:


1) All the pixels of component 1, followed by
2) All the pixels of component 2, followed by
3) All the pixels of component 3, followed by

and so on...



So, it makes me wonder if there is a case
to be made for introducing an image class
with the second type of memory organization...


     Luis


More information about the Insight-developers mailing list