[Insight-developers] Iterators bypassing DataAccessor / ImageAdaptors

Luis Ibanez ibanez@cs.unc.edu
Thu, 22 Mar 2001 10:11:38 -0500


Hi Josh,

I just added a Value() method to ImageIteratorWithIndex and to
ImageConstIteratorWithIndex.

This method bypasses the DataAccessor, and return a direct
reference to the pixel data. That should provide a faster access
to pixel data, at the price of  not supporting ImageAdaptors.

The use will be something like:

it.Begin();
while( it.IsAtEnd() ) {
    it.Value()  = 5;
    a = it.Value();
   it.Value() += 5;
  ++it;
}


There were also a couple of changes in the way iterators access
data, and that may improve the performance when using Set/Get.

Could you  check in your code for testing iterator speed,
maybe as a test program ?


Thanks a lot



Luis