[Insight-users] Negative values inside a shape using
SignedMaurerDistanceMapImageFilter
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Thu Aug 30 14:11:03 EDT 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070830/f7a56a90/PGP.pgp
More information about the Insight-users
mailing list