[Insight-developers] Iterators and header files

Michael Bell mbell at cs.unc.edu
Tue Sep 5 14:36:15 EDT 2000


	Currently, in order to create an iterator, it is necessary to have
code similar to this:
typedef ImageIteratorOriented<typename TInputImage::Type,
                             TInputImage::Dimension> InputIterator;
InputIterator it(inputImage,inputImage->GetBufferStartIndex(),
                           inputImage->GetBufferSize());

It would be nice to be able to say:
Iterator it = ImageIteratorOriented(inputImage); 

or something similar.  In other words, can we add a constructor, or a
function, to the base Iterator class that correctly sets up the image
iterator based on the image?

Also, there are several .h files with implementation code in them.
(itkCellInterface.h,itkCreateObjectFunction.h,itkDataObject.h,
 itkExceptionObject.h,itkBufferIterator.h ...and more)
Perhaps this code, even though it is small, should be in a .cxx or .txx
file.

Michael Bell


-----
mbell at cs.unc.edu
www.cs.unc.edu/~mbell





More information about the Insight-developers mailing list