[Insight-users] ShapedNeighborhoodIterator ActiveIndexList question

Jared Hoover jsh238 at gmail.com
Mon Jun 19 19:32:06 EDT 2006


ITK users -

How does the ActiveIndexList store the offset values when defining the
neighborhood shape?  Does it keep a list of the OffsetType variables or just
the values of the variables?

Like the ShapedNeighborhoodIterators1 example - the following 2 chunks of
code should produce the same result.  Is this correct?


First Chunk:
ShapedNeighborhoodIterator<ImageType> it (radius, image, region);
ShapedNeighborhoodIterator<ImageType>::OffsetType offset1 = {{ 0,0,0 }};
ShapedNeighborhoodIterator<ImageType>::OffsetType offset2 = {{ 1,0,0 }};
ShapedNeighborhoodIterator<ImageType>::OffsetType offset3 = {{ 2,0,0 }};
it.ActivateOffset(offset1); it.ActivateOffset(offset2); it.ActivateOffset
(offset3);


Second Chunk:
ShapedNeighborhoodIterator<ImageType> it (radius, image, region);
for( int i = 0 ; i < 3 ; i++)  {
     ShapedNeighborhoodIterator<ImageType>::OffsetType offset = {{ i, 0, 0
}};
     it.ActivateOffset(offset);
}


Thanks.
Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060619/cb9c52a4/attachment.html


More information about the Insight-users mailing list