[Insight-developers] RGB to Vector ImageAdaptors,

Luis Ibanez luis.ibanez@kitware.com
Sat, 25 Jan 2003 17:41:36 -0500


Hi Josh,

The RGB to Vector ImageAdaptors have been
checked in.


They are in Code/Common:

     itkRGBToVectorImageAdaptor
     itkVectorToRGBImageAdaptor


Tests for both are in TestingCodeCommon.


These adaptors do not duplicate the image
memory. They just reinterpret the pixel
type at each access of the Iterator.

It is possible also to generate Filter
versions of this by using the AdaptImageFilter.

This filter converts a PixelAccessor into a
Functor and then use the UnaryFunctorFilter to
implement a multi-threaded filter.


Adaptors will only work if you are using an
Image filter that use adaptor-compatible iterators.
(those who use the Set/Get methods).

The AdapImageFilter on the other hand will work
in any case, but at the price of duplicating
the image memory.



   Luis