[Insight-users] Watershed Behavior

Albert Huang alberth+itk at ece.ubc.ca
Thu Feb 8 19:31:25 EST 2007


Thanks for the fast reply Richard.

I quickly remove the relabel filter and save the output of watershed as 
unsigned int. As you can see with the grayscale image here:
    http://www.ece.ubc.ca/~alberth/watershed_morph2.png
The outputs are labeled as:
    001 002 003 004 005 006 007 ... 018 <---------- topmost
    325 326 327 328 329 330 331 ... 342
            ..........
    019 020 021 022 023 024 025 ... 036
    001 002 003 004 005 006 007 ... 018 <---------- bottommost
Where the topmost and bottommost rows are labeled as the same numbers or 
wrap around as I called it.

Albert

----- Original Message -----
From: "Richard Beare" <richard.beare at gmail.com>
To: "Albert Huang" <alberth+itk at ece.ubc.ca>
Cc: "Gaetan Lehmann" <gaetan.lehmann at jouy.inra.fr>; <insight-users at itk.org>
Sent: Thursday, February 08, 2007 2:58 PM
Subject: Re: [Insight-users] Watershed Behavior

Hi,
I'm having difficulty determining what you mean by wrap around - from
the example it looks as though it could be wrap around of the
colormap, rather than the watershed.

Try saving the output of the watershed filter, rather than the
relabeller/coloring step and probe the values. For example, save as
unsigned short tif and use the ImageView or some other tool to check
the values. There shouldn't be any wrap around, but you never know.

On 2/9/07, Albert Huang <alberth+itk at ece.ubc.ca> wrote:
> Thanks Richard and Gaetan
>
> The new filter works very well on the edges for my application. However,
> when I relabel my image after the morphological watershed, I get a wrap
> around on the very top and bottom grids (even though they are alternating
> intensity blocks). Is that a known behavior?
>
>         http://www.ece.ubc.ca/~alberth/watershed_morph.png
>
> The left and right image edge labels are ok with no wrap around. Checking
> the gradient magnitude image, all image edges have 0 gradient (top, 
> bottom,
> left, right).
>
> My morphological watershed filter has
>     input (double)
>     output (unsigned long)
>     SetMarkWatershedLine=false.
> My relabel component image filter has
>     input (unsigned long)
>     output (unsigned int)
> The relabeler outputs for my example are [1...342] which seems to be still
> well within the range of my output type.
>
> Albert
>
> ----- Original Message -----
> From: "Gaetan Lehmann" <gaetan.lehmann at jouy.inra.fr>
> To: "Albert Huang" <alberth+itk at ece.ubc.ca>
> Cc: <Richard.Beare at ieee.org>; <insight-users at itk.org>
> Sent: Thursday, February 08, 2007 1:48 AM
> Subject: Re: [Insight-users] Watershed Behavior
>
>
> Hi,
>
> You may also want to test the morphological watershed Richard and I have
> contributed, and see if it gives better results.
>
> http://hdl.handle.net/1926/202
>
> You can also found this new filter in ITK cvs now.
>
> Regards,
>
> Gaetan
>
>
> On Thu, 08 Feb 2007 04:34:39 +0100, Richard Beare
> <richard.beare at gmail.com> wrote:
>
> > Have a look at the gradient image and dheck whether there are plateaus
> > in the zig-zag area. The behaviour of the standard itk watershed is
> > somewhat arbitary in the presence of plateaus.
> >
> >
> > On 2/8/07, Albert Huang <alberth+itk at ece.ubc.ca> wrote:
> >>
> >>
> >> Dear experts
> >>
> >> I was just playing with the watershed pipeline a few days ago using a
> >> checkerboard pattern (with uint8 grids of black=64, gray=153,
> >> white=192),
> >> and observed a zig-zaggy pattern on some edges (see
> >> http://www.ece.ubc.ca/~alberth/watershed.png). Adding a
> >> smooth field on the checkboard results in more zig-zaggy behaviors on
> >> edges
> >> that seem fairly strong in the input image. I am wondering if this is
> >> normal
> >> behavior for the itkWatershedImageFilter?
> >>
> >> My pipeline (ITK 3.0.1) setup is as below:
> >>     file reader ->
> >>     vector gradient magnitude image filter (pca off) ->
> >>     watershed (level=0.2, threshold=0.0) ->
> >>     relabel component
> >>
> >> p.s. The black regions in the outputs are colormap problems and not a
> >> watershed issue. =)
> >>
> >> Thanks
> >> Albert
> >>
> >> _______________________________________________
> >> Insight-users mailing list
> >> Insight-users at itk.org
> >> http://www.itk.org/mailman/listinfo/insight-users
> >>
> >>
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr
>
> 


More information about the Insight-users mailing list