[Insight-users] What is GetNeighborhoodIndex of the ShapedNeighborhoodIterator?

David Doria daviddoria at gmail.com
Mon Jul 18 13:29:04 EDT 2011


On Mon, Jul 18, 2011 at 1:00 PM, Dawood AlMasslawi <masslawi at gmail.com>wrote:

> Yes, that makes sense!
>>
>> In the past I also had some trouble with neighborhood iterators  of a
>>
>> large radius, so I guess they are not utilized for that use. Probably
>>
>> it has something to do with the boundary condition, every time I
>>
>> iterated near the boundaries somethings went wrong!
>>
>> Dawood
>>
>
I'm not sure if this was the same problem you were having, but I have
figured out why the indices were higher than 100.

I was setting up the iterator with:

IteratorType iterator(image->GetLargestPossibleRegion().GetSize(), image,
image->GetLargestPossibleRegion());

However, this first parameter is interpreted as a radius. So the iterator
was actually 21x21 instead of 10x10 in the example, for a total of 441
indices. The indices 199 and 241 differ 42, exactly the right amount so that
they are still at offsets (0,1) and (0,-1) (two rows apart).

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


More information about the Insight-users mailing list