[Insight-users] Stop flooding pools when "water sheds" would be introduced or use "fill holes" for that
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Thu Feb 18 17:05:44 EST 2010
Hi,
A possible way to achieve that is to use the Component Tree
representation.
In a component tree, all the connected component at all the grey level
are stored in a tree. In your illustration, everything labeled with 1,
2 or 3 is a branch of the tree with no ramification and terminated by
a leaf.
__ ________ ___
.. .333...
.11.22222222. .3.
.. .2222... .
.22.
..
With the component tree representation, it should be easy to tag the
node in the tree with the required characteristics with a label, as in
your illustration, and the others with a specific label - for example 0.
I've made a contribution a few years ago on the insight journal on the
component trees. The article is of very poor quality if I remember
correctly, but the code to generate and manipulate the component tree
is there.
Gaëtan
Le 18 févr. 10 à 22:50, Richard Beare a écrit :
> 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
>>
>>
>>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> 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 http://www.itk.org
http://www.mandriva.org http://www.bepo.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100218/af9721dd/attachment.pgp>
More information about the Insight-users
mailing list