[Insight-users] Watershed and Image J

Atwood, Robert C r.atwood at imperial.ac.uk
Tue Sep 6 13:52:20 EDT 2005


Ken, 
I think you don't need steps 2 and 3 as the watershed algorithm already does something similar. It uses a different algorithm from ImageJ to obtain similar results, if I understand correctly, (Josh Cates can correct me if I am wrong) Steps 2 and 3 as described in ImageJ are how the watershed is implemented and are what one may call 'uphill' method, whereas ITK uses a 'downhill' method which is much faster. 
 
I have already done what I think you want to do, it is really as simple as appling the distance map, applying some filtering, and then applying the watershed algorithm. However I originally used my own distance algorithm based on progressive erosion (I did not realize that there was a distance map in ITK at that time or perhaps it had not been included yet) 
 
I used the output of my distance algorithm, saved to a separate file, as input to the ITK based watershed routine, this routine applys a prefilter with selectable parameters (I think I used curvature flow anistropic diffusion) and the output of this is the input for the watershed. Along the way the output is also used as input to a slicer to create quick visualization of what has been done. It should be no problem to use the output of Danielsson distance map in a similar way. 

See 'Atwood, Jones, Lee, Hench ; SCRIPTA MATERIALIA 51 (11): 1029-1033 DEC 2004  ; Analysis of pore interconnectivity in bioactive glass foams using X-ray microtomography"

for the kind of results I was able to get for separating interconnected bubbles in 3-d foam. 

I got the idea from this article where they use it for plant cell walls, in fact this is how I first found out about ITK, searching for 3d-watershed algorithms:

 www.plantsci.cam.ac.uk/Haseloff/laboratory/labdocs/workPDFs_2004/Work2003_lo_res.pdf <http://www.plantsci.cam.ac.uk/Haseloff/laboratory/labdocs/workPDFs_2004/Work2003_lo_res.pdf>  

 
--Robert
________________________________

From: insight-users-bounces+r.atwood=imperial.ac.uk at itk.org on behalf of Ken Urish
Sent: Mon 05/09/2005 18:13
To: insight-users at itk.org
Subject: [Insight-users] Watershed and Image J


Hey

Im trying to put some code together to do a watershed similar to ImageJ. 

In ImageJ's watershed method:
1) A euclidean distance map of the binary image is created. 
2) The "Ultimate Points" of the map is then created by eroding an object until only one pixel remains. One object can have multiple "ultimate points" (think overlapping circles).
3) The image is then dilated from each of these points until : a) it hits the original object boundary or b) it hits the dilation of another object. In case b, a one-pixel wide boundary of background color seperates the colliding dilating objects. Essentially this is a nice way to seperate two overlapping circles. 

I dont have alot of experience with Watershed in ITK. 
Im using the DanielssonDistanceMap to create the distance map. Is there a convienent way to get the ultimate points of the image? This information looks like its stored in one of the watershed classes, but I cant quite see where. Does ITK have a filter that will flood fill from a point until it hits another dilating object or the initial boundary edge?

Is there an easier way to do this? If anyone can help me out, the first round is on me at MICCAI.

Thanks
--Ken--

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050906/bab332e1/attachment.html


More information about the Insight-users mailing list