[Insight-users] neighborhood iterator

David Doria daviddoria at gmail.com
Wed Feb 16 13:16:23 EST 2011


On Wed, Feb 16, 2011 at 1:11 PM, robert tamburo <robert.tamburo at gmail.com>wrote:

> As you iterate the image, check to see if you're on the grid. If you are,
> then set and iterate the neighborhood. Something like:
>
> while(!it.IsAtEnd())
>   {
>   index = it.GetIndex();
>   if( (index[0] % 2 == 0) && (index[1] % 3 == 0) )  // or whatever
>     {
>     neighborhoodIt.SetLocation(index);
>     // iterateTheNeighborhood
>     .
>     .
>     .
>     }
>
>   ++it;
>   }
>
> I think there is a concept of this grid by setting the "Stride" (I think
this is like a step length per dimension). After a very quick look, I see a
GetStride function in NeighborhoodIterator (but not a SetStride?) - maybe
you can do some grepping and see if you come up with anything.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110216/a908bf1a/attachment.htm>


More information about the Insight-users mailing list