[Insight-users] linear and neighborhood iterators

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 3 12:39:06 EDT 2008


Hi Zhihong,

Officially, the iterators do not guarantee any particular path
for visiting the pixels of an image.

However, it is the case that the basic walking path of a neighborhood
iterator follows a monotonic increase in the offset of the pixel data
buffer.  That is, it visits the pixels in the order they are stored in
memory.

The Linear iterator, however, can be set to change that order. When
you select the Direction of the iterator, you can make it walk first
along Z (direction=2), instead of the default X (direction=0) that the
Neighborhood iterator will use.

These two iterators will only walk synchronized if you set the
linear iterator to walk along Direction = 0.


    Regards,


        Luis


----------------
zhihong hu wrote:
> Hi Luis,
>  
> Suppose I have two images, I want to use a linear iterator for one image 
> and a neighborhood iterator for another one. Does this work?
>  
> Thanks.
>  
> Zhihong
> 


More information about the Insight-users mailing list