[Insight-users] Iteration within a Neighbourhood
Luis Ibanez
luis.ibanez@kitware.com
Tue, 03 Dec 2002 08:04:50 -0500
Hi Puja,
The SmartNeigborhood iterator is what you need in this case.
This iterator allows you to visit the pixels in its
neighborhood by calling its GetPixel(int) method.
Then you can move the iterator to the next position.
It will update its internal neighborhood automatically.
Please take a look at the code in:
Insight/Code/BasicFilters/
itkZeroCrossingImageFilter.txx
In particular the ThreadedGenerateData() method.
BTW Josh is currently refactoring this iterator to include
additional functionality. (see his recent posts to the list).
Please let us know if you have further questions.
Thanks
Luis
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Puja Malik wrote:
> Hello,
>=20
> I would like to traverse through an image in small neighbourhoods, and =
> for this I am planning on using the NeighborhoodIterator. However,=20
> I would also like to traverse each of the pixels in a single=20
> neighbourhood before moving on to the next one. How would I be able to=
=20
> implement this?
>=20
> Thanks!
> Puja
> =20
>=20
> --=20
> ---------------------------------------
> Puja Malik
> M. E. M=FCller Institute for Biomechanics
> University of Bern
> P. O. Box 30
> 3010 Bern
> Switzerland
> Phone: +41-31-632-8730
> Fax: +41-31-632-4951
> Email: Puja.Malik@memot.unibe.ch
> ---------------------------------------
>=20
> =20