[Insight-developers] Re: ShapedNeighborhoodIterators
Joshua Cates
cates at sci . utah . edu
Tue, 27 May 2003 10:23:34 -0600 (MDT)
Hi Jim,
Yes, the best options are GetNext/Previous and the shaped iterator. In
theory the shaped iterator should be faster. The trade-off is a more
limited API for accessing and setting pixels, which could make your code a
little uglier.
Currently you will have to manually activate the face connected neighbors
and the center pixel. Probably we should set up an
ActivateFaceConnectedNeighbors() method since this is likely a common
case.
Let me know if you have problems/suggestions as so far I have not made
very extensive use of the shaped iterators.
Josh.
______________________________
Josh Cates
School of Computer Science
University of Utah
Email: cates at sci . utah . edu
Phone: (801) 587-7697
URL: http://www . sci . utah . edu/~cates
On Tue, 27 May 2003, Miller, James V (Research) wrote:
> Josh,
>
> What is the recommended way to access the face connected neighbors of a
> pixel using the NeighborhoodIterators? The options seem to be
> NeighborhoodIterator:GetNext()/GetPrevious() and setting up a
> ShapedNeighborhoodIterator.
>
> The ShapedNeighborhoodIterator "should" be faster when moving the iterator
> since it only updates a few of the pointers. But are there convenience
> methods for activating the face connected neighbors (and the center pixel)
> of an iterator? Or do I need to call ActivateOffset() manually for each face
> connected pixel?
>
> Jim
>
>
>
> Jim Miller
> _____________________________________
> Visualization & Computer Vision
> GE Research
> Bldg. KW, Room C218B
> P.O. Box 8, Schenectady NY 12301
>
> millerjv at research . ge . com <mailto:millerjv at research . ge . com>
>
> james . miller at research . ge . com
> (518) 387-4005, Dial Comm: 8*833-4005,
> Cell: (518) 505-7065, Fax: (518) 387-6981
>
>
>