[Insight-users] super fast 3d sphere algorithm

Benjamin King king.benjamin at mh-hannover.de
Tue Jun 28 10:47:02 EDT 2005


Hi Leila,

> I am looking for a fast sphere (3D) algorithm for searching around the
> vicinity of voxels of my image,

How big is the sphere?
If your sphere is fairly small, you could use a shaped neighborhood iterator:
http://www.itk.org/Doxygen/html/classitk_1_1ConstShapedNeighborhoodIterator.html

If your sphere is big, you could try a spatial function iterator with an 
ellipsoid:
http://www.itk.org/Doxygen/html/classitk_1_1FloodFilledSpatialFunctionConditionalConstIterator.html
http://www.itk.org/Doxygen/html/classitk_1_1EllipsoidSpatialFunction.html

If neither approach fits your need, you probably get frustrated enough to 
write your own SphereIterator =). In this case, you probably want to look at 
Bresenham's circle drawing algorithm:
http://www.cim.mcgill.ca/~langer/557B/Jan9.html
http://portal.acm.org/citation.cfm?id=319126

Hope it helps,
	Benjamin

-- 
Benjamin King
Experimentelle Radiologie
Medizinische Hochschule Hannover
Tel.: +49  511  532-2663


More information about the Insight-users mailing list