[Insight-users] Stop flooding pools when "water sheds" would be introduced or use "fill holes" for that

Richard Beare richard.beare at gmail.com
Thu Feb 18 16:50:47 EST 2010


Hi,
I think I understand what you're getting at. I think that what you
want to do is find the first grey level at which a basin meets a
neighbour and designate members of the basin that are less than that
as members of your ourput label. It has to be strictly less than,
otherwise plateaus between basins will be included. I don't recognise
this offhand as a standard operation or as equivalent to any standard
combination. I'll have to think about that further. Note that while it
looks like a useful thing in 1D there is a fair chance that it will
prove a lot less useful in 2Dor 3D, but it is worth checking out.

I can think of a couple of ways of tackling this, but both require
modified filters. The nice way, I think, is to extend the watershed
filter. The changes involve recording the grey level at which each
label first meets a neighbour and then do a post processing step which
sets each label pixel with a corresponding grey level greater than or
equal to this to zero. I think the watershed needs to run to
completion before this step because detecting the collisions is needed
to find the overflow value.

The alternative sounds like more of a hack, but probably just as fast,
and nicely isolated from the other filters. Basically you would check
the grey values at the border of each labelled region to find the
minimum and then perform the same post processing step. This could be
done in a single filter that you apply as a post processing step to
the watershed.

On Thu, Feb 18, 2010 at 6:34 PM,  <lynx.abraxas at freenet.de> wrote:
> On 17/02/10 21:49:09, Kishore Mosaliganti wrote:
>> Hi Lynx,
>>
>> From your description, I understand that you don't want flat regions
>> in the image to be covered by the watershed labels. In other words,
>> you want the labels to exactly cover pixels that lead to a mimina. Is
>> that right?
>
> Hello Kishore, Richard and Luis,
>
>
> Yes  that's  pretty  much what I want but with the addition that I only want a
> label-mask where every pixel is definitly only leading to one definit minimum.
>
> Here's a simple 1D illustration (for momospaced fonts):
>
>    __ ________  ___
>  ..             .333...
>   .11.22222222. .3.
>    .. .2222...   .
>        .22.
>         ..
>
> The  dots  plot  graph  represents  the greyvalue in y-direction and the pixel
> position in x-direction. The numbers represent the labels and  their  seize  I
> neeed.  They  are  like  a  pool filled only up to a local maxima, in 2D those
> points would be saddle points but I don't know what they'd be in 3D.
>
> The white interrupted line above is the mask I would need to mask  the  result
> from  the  itk morphological watershed to achieve what I want. (I tried to get
> this mask from the fill holes filter but something is wrong).
>
> So I'm either looking for a filter (chain) that could create me this mask,
> Or if it would be possible to stop the watershed filter from  filling  up  the
> basins at the corresponding heights (in 2D a saddle point).
>
> I'll paint a drawing to post as well.
>
>
> I hope this helps understanding my problem. If not let me know.
>
> Many thanks for looking into this and trying to understand my problem.
>
> Thanks,
> Lynx
>
>
>


More information about the Insight-users mailing list