[Insight-users] Negative values inside a shape
using SignedMaurerDistanceMapImageFilter
Luis Ibanez
luis.ibanez at kitware.com
Mon Sep 3 09:46:12 EDT 2007
Hi Blue Moon,
As Gaetan pointed out,
The Maurer distance filter works using the pixel labels to defined
the object.
You have (at least) the following two options:
A) Presumably you had the full mask of the object before you
generated its contour. Is this full mask the one that you
should pass as input to the Maurer filter.
B) If you only have the contour, then you could fill it up by
using any of the Region Growing filters available in ITK.
You will find a description of this filters in the
ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
in the "Segmentation" chapter.
Regards,
Luis
-------------------
Blue Moon wrote:
> Hi Gaëtan,
>
> Thanks a lot for your reply. That's actually what I thought it should
> be, but in fact, as I said in the msg, I get zeros in the distance map
> for these filled pixels. I'd be very grateful if you may give any
> further advice.
>
> Best,
> BM
>
>
>> From: Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
>> To: "Blue Moon" <bluemoon608 at hotmail.com>
>> CC: ITK <insight-users at itk.org>
>> Subject: Re: [Insight-users] Negative values inside a shape using
>
> SignedMaurerDistanceMapImageFilter
>
>> Date: Thu, 30 Aug 2007 20:11:03 +0200
>>
>>
>> Hi,
>>
>> In the SignedMaurerDistanceMapImageFilter, the object are not defined
>> by their bourders, but by the label of their pixel. All the pixels
>> above 0 are inside the object, the other are outside.
>>
>> In your example, the center of the shape is *outside* the object, and
>> that's why you get positive values. To get negative values, you have
>> to fill your object, for example with the
>> GrayscaleFillholeImageFilter, before computing the distance map.
>> Something like:
>>
>> o o o o o o o o
>> o o o x x o o o
>> o o x x x x o o
>> o o x x x x o o
>> o o o x x o o o
>> o o o o o o o o
>>
>> Will give what you want.
>>
>> Regards,
>>
>> Gaëtan
>>
>>
>>
>>
>> Le 30 août 07 à 20:00, Blue Moon a écrit :
>>
>>> Hi,
>>>
>>> I am new to ITK and I am trying to use
>>> SignedMaurerDistanceMapImageFilter to compute the distance map
>>> around a shape. My problem with this filter is I always get positive
>>> values inside the shape. An example is given below:
>>>
>>> For an input shape o o o o o o o o
>>> o o o x x o o o
>>> o o x o o x o o
>>> o o x o o x o o
>>> o o o x x o o o
>>> o o o o o o o o
>>>
>>> I am expecting something like:
>>> 3 2 1 1 1 1 2 3
>>> 2 1 1 0 0 1 1 2
>>> 2 1 0-1-1 0 1 2
>>> 2 1 0-1-1 0 1 2
>>> 2 1 1 0 0 1 1 2
>>> 3 2 1 1 1 1 2 3
>>>
>>> but I get +1 instead of -1 for the internal pixels. When I set the
>>> internal 'o' to 'x' in the input image, I get '0' for these positions.
>>> Is this what the filter is designed to produce, or I've done
>>> something wrong?
>>> Any suggestions on how to use this filter will be much appreciated.
>>> Thanks in advance.
>>>
>>> BM
>>>
>>> _________________________________________________________________
>>> ä¸ä¸çåå°çæåè¿è¡äº¤æµï¼å
è´¹ä¸è½? Live Messenger;
>>> http://get.live.com/messenger/overview
>>> _______________________________________________
>>> 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
>>
>>
>>
>
>
>> << PGP.sig >>
>
>
> _________________________________________________________________
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list