[Insight-users] Question about watershed filter

Joshua Cates cates at sci.utah.edu
Wed, 18 Feb 2004 13:13:59 -0700 (MST)


Hi Feng,

Glad the watersheds is working for you.  In answer to your questions: 

1. There is no fast way to do this at the level of the
itkWatershedImageFilter.  The only way would be sample the output value at
both the 0.2 and 0.4 levels.   

You could, however, write a simple list-traversal algorithm to do this
based on the "SegmentTree" ( GetSegmentTree() ).  The SegmentTree is an
ordered linked-list of region merges with entries that look like:

A->B h

where A merges into region B at watershed level h.

If you knew, for example, that the voxel has region label 23 at level 0.2, 
simply traverse the list until you find h > 0.4, keeping track of any 
merges involving region 23.

Traversing the following list would tell you that label 23 has become 
label 99 at level 0.4.

...
23->8   0.3
8->45   0.356
45->99  0.387
..
56->6   0.43
...


2. There is no limitation on the step value for changing the level.  You 
can see from question 1 how the new image is created from the SegmentTree.  
A list traversal to the requested level creates a mapping from the 
original labels to the new labeled image.   The merging stage of the 
pipeline is re-triggered when there is no information in the SegmentTree 
for the requested level.  The resolution at which merges occur is not 
constrained by the algorithm.

josh.

______________________________
 Josh Cates			
 Scientific Computing and Imaging Institute
 University of Utah
 Email: cates at sci.utah.edu
 Phone: (801) 587-7697
 URL:   http://www.sci.utah.edu/~cates


On Wed, 18 Feb 2004, Feng Ma wrote:

> Hi,
> 
>   I have been using watershed filter in ITK. It works great.
> 
>   I have a few questions about the label hierarchy with different values of 
> parameter level:
> 
>   1. Is there a way to exact the hierarchy table at different levels? i.e., 
> a method to answer the following sample question: a voxel has region label 
> 23 at level 0.2. What's its label value at level 0.4?
> 
>   2. From the manual, we can manipulate the level value below initial value 
> to get segmentation without triggering the full watershed pipeline. Is there 
> a limitation on step value how I change the level? For example, if I have 
> initial level value set as 0.4. I could go to level 0.3 without triggering 
> the full watershed pipeline. Could I go to 0.25 or even 0.245 and still have 
> different segmentation table?
> In other words, is there an internal step value of parameter level to 
> control the building of segmentation hierachy table? Could we set this value 
> to control the resolution of segmentation hierachy table?
> 
>   Thanks a lot.
> 
> -Feng
> 
> _________________________________________________________________
> Get a FREE online computer virus scan from McAfee when you click here. 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>