[Insight-developers] ImageRegionIteratorWithIndex

Yinpeng Jin yj76@columbia.edu
Wed, 18 Jul 2001 17:30:46 -0400


Is somebody supposed to systematically modify all the codes inside the itk
classes where it.Begin() was using? or we should take care of our own
check-ins?
Anyway, thanks to Jim, It works for GoToBegin().
Yinpeng

----- Original Message -----
From: "Miller, James V (CRD)" <millerjv@crd.ge.com>
To: "'Yinpeng Jin'" <yj76@columbia.edu>;
<insight-developers@public.kitware.com>
Sent: Wednesday, July 18, 2001 5:14 PM
Subject: RE: [Insight-developers] ImageRegionIteratorWithIndex


> It looks like the Begin()/End() definitions now perform like ImageIterator
and ImageRegionIterator.
>
> That is Begin()/End() return an iterator that points to the beginning or
end of a region where they
> used to reposition the current iterator.
>
> That is the only change that I can see.
>
> So the line
>
> it.Begin() should change to it.GoToBegin()
>
> Jim
>
> -----Original Message-----
> From: Yinpeng Jin [mailto:yj76@columbia.edu]
> Sent: Wednesday, July 18, 2001 4:24 PM
> To: insight-developers@public.kitware.com
> Subject: [Insight-developers] ImageRegionIteratorWithIndex
>
>
> What is the difference in terms of usage between
> ImageRegionIteratorWithIndex and the old version of
> ImageSimpleRegionIterator?
> Suddently found that the below codes begin to crash on it.Set() Method. It
> used to work for SimpleRegionIterator.
> Yinpeng
>
>
>  itk::ImageRegionIteratorWithIndex <UShortImage2D> it(inputimg, region);
>  it.Begin();
>  int k=0;
>  while( !it.IsAtEnd()) {
>   it.Set(TestingImage[k]);
>   k++;
>   ++it;
>  }
>
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers