[Insight-developers] itkImageConstIteratorWithIndex.h

Mark Foskey mark_foskey@unc.edu
Wed, 23 Apr 2003 12:11:40 -0400


In itkImageConstIteratorWithIndex.h, both IsAtBegin() and IsAtEnd() 
return !m_Remaining.  It appears that

   it.GoToBegin();
   std::cout << it.IsAtBegin() << std::endl;

   it.GoToEnd();
   std::cout << it.IsAtEnd() << std::endl;

will both print 0.  Do we at least want to document this behavior?  I 
can imagine scenarios where you might want to test whether an iterator 
has been incremented since GoToBegin() was called, although I think 
they would be rare.

-- 
Mark Foskey    (919) 843-5436  Computer-Aided Diagnosis and Display Lab
mark_foskey@unc.edu            Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey  Chapel Hill, NC  27599-7515