[Insight-developers] standardizing iterator api

Joshua Cates cates@cs.utah.edu
Tue, 8 May 2001 15:45:12 -0600 (MDT)


Hi all,

I propose that we talk more about the image iterator API during this
friday's tcon.  Particularly, the Begin() and End() methods are defined
differently among the iterators.  I recall the main issue being whether
these methods actually return iterators (like stl) or set the iterator on
which they are called.  Seems like the latter was the preferred style
because (a) simpler implementation and (b) discourages the false
impression that our iterators model the stl iterator concept.

choice being to support either/or:

1.
itkIterator it;
for (it.Begin(); ! it.IsAtEnd(); ++it) {}

2.
itkIterator it;
for (it = it.Begin(); it < it.End(); ++it) {}


Josh.


______________________________
 Josh Cates			
 School of Computer Science	
 University of Utah
 Email: cates@cs.utah.edu
 Phone: (801) 587-7697
 URL:   www.cs.utk.edu/~cates