[Insight-developers] ImageIterator

ASHES D GANGULY ashes at email.unc.edu
Thu Sep 14 14:47:43 EDT 2000


 The Begin() method in ImageIterator returns a new iterator which points
to the beginning of the region or image, and does not change itself. If I
am not mistaken, this means an iterator can be used only once to iterate
over a region/image, after which it becomes useless.

 It would be nice if in the Begin() method the iterator resets itself to
the beginning of the region/image and thus can be used again, instead of
creating a new iterator.

 What that means is instead of doing
-------
ImageRegionIterator it;

it.Begin()
while(!it.IsAtEnd())
{
}

ImageRegionIterator it2 = it.Begin();
while(!it2.IsAtEnd())
{
}
-------

we do

-------
it.Begin();
while(!it.IsAtEnd())
{
}

it.Begin();
while(!it.IsAtEnd())
{
}
------

Regards,
    Ashes








More information about the Insight-developers mailing list