[Insight-users] A question about neighborhood iterator and image
iterator
Joshua Cates
cates at sci . utah . edu
Mon, 6 Oct 2003 14:32:14 -0600 (MDT)
Hi Feng,
If you initialize a Neighborhood iterator and a normal Region iterator
over the same region, they are guaranteed (by design) to walk the region
indicies in the same order.
Josh.
______________________________
Josh Cates
Scientific Computing and Imaging Institute
University of Utah
Email: cates at sci . utah . edu
Phone: (801) 587-7697
URL: http://www . sci . utah . edu/~cates
On Fri, 3 Oct 2003, Feng Ma wrote:
> Hi, Josh and Luis:
>
> I am a little confused about how to use neighborhood iterator and image
> iterator. Josh has a code example in ITK Neighborhood ppt file:
>
> typedef itk::Image<float, 3> ImageType;
> ImageType::Pointer image = SomeImageSource->GetOutput();
>
> itk::ConstNeighborhoodIterator<ImageType> it(radius, image,
>
> image->GetRequestedRegion());
> itk::ImageRegionIterator<ImageType> out(output_image,
> image->GetRequestedRegion());
>
> for (it.GoToBegin(); ! it.IsAtEnd(); ++it, ++out)
> {
> out.Set(0.5 * it.GetNext(2) - 0.5 * it.GetPrevious(2));
> }
>
> How does ITK internal mechanism make sure that neighborhood iterator it
> and image region iterator out are always visiting the same pixel in image?
>
> Thanks.
>
> -Feng
>
> _________________________________________________________________
> Share your photos without swamping your Inbox. Get Hotmail Extra Storage
> today! http://join . msn . com/?PAGE=features/es
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>