[Insight-developers] broken code

Luis Ibanez ibanez at cs.unc.edu
Mon Nov 13 16:30:25 EST 2000


Hi Josh,

This could be a a consequence of
the introduccion of ImageAdaptors.
Specially if you are at some point
using the class ImageIteratorWithIndex.

One of the modifications done to make
Adaptors work was to parametrize Iterators
over the image type instead of the pixeltype
and dimension.

So the declarations that was previously like:

typedef   itk::Image<   itk::Scalar< float >,  3  >  myImageType;

typedef  itk::ImageIteratorWithIndex<
                    myImageType::PixelType,
                    myImageType::ImageDimension > myIteratorType;


Become now:

typedef  itk::Image<   itk::Scalar< float >,  3   >  myImageType;
typedef  itk::ImageIteratorWithIndex< myImageType >  myIteratorType;


This is needed to allow the iterator to get access
to the DataAccessor type defined inside the Image
and eventually inside an Adaptor that act like an
image.

-----

This modification was done on :

ImageIteratorWithIndex
ImageRegionSimpleIterator
ImageLinearIterator
ImageSliceIterator
FilterImageTernary
FilterImageBinary
FilterImageGaussian


-----

The rest of Iterators still have the original API.

....In some way, independently of ImageAdaptors, this
seems to be a more natural way to declare iterators,
because you can internally get access to the pixel type
and the image dimension, while the declaration is shorter
for the toolkit user.


-----

Sorry about that,

Luis





--
______________________________________________________________________

Luis Ibanez
Research Assistant Professor - Division of Neurosurgery
University of North Carolina at Chapel Hill
CB# 7060, Chapel Hill, NC 27599
email : ibanez at cs.unc.edu       home  : http://www.cs.unc.edu/~ibanez
phone : (919)-843-9961          fax   : (919)-966-6627
______________________________________________________________________




More information about the Insight-developers mailing list