[Insight-users] Negative values inside a shape using
SignedMaurerDistanceMapImageFilter
Blue Moon
bluemoon608 at hotmail.com
Fri Aug 31 04:54:25 EDT 2007
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
More information about the Insight-users
mailing list