[Insight-users] Binary Morphology get output with 3 values ( 0 255 -32768)
Baoyun Li
baoyun_li123 at yahoo.com
Fri Feb 27 10:30:58 EST 2009
Dear Gaetan:
Thanks, now I SetbackgroundValue as you suggested. It works.
But SetBackgroundValue() is not defined in the itkBinaryMorophologicalErod filter.
1, Is SetbackgroundValue given by the base calss itkBinaryMorphologyImageFilter--itkSetMacro(BackgroundValue, OutputPixelType).
2, I do not know clearly itkSetMarco mean. Based on my understanding,
If I itkSetMacro(BackgroundValue, OutputPixelType) defined in some filter, I can used filter->SetBackgrouValue() to set the value. Is it true?
Thanks and my best regards
Baoyun
________________________________
From: Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
To: Baoyun Li <baoyun_li123 at yahoo.com>
Cc: ITK Users <insight-users at itk.org>; Siddharth Srivastava <siddys at gmail.com>
Sent: Friday, February 27, 2009 2:31:42 AM
Subject: Re: [Insight-users] Binary Morphology get output with 3 values ( 0 255 -32768)
Hi,
Have you set the background value, with SetBackgroundValue()?
Also, you may want to use BinaryMorphologicalClosingImageFilter¹, which already contain the code required to avoid the border effects.
Regards,
Gaëtan
¹ http://www.itk.org/Doxygen/html/classitk_1_1BinaryMorphologicalClosingImageFilter.html
Le 27 févr. 09 à 00:39, Siddharth Srivastava a écrit :
> Hi Baoyun,
> I think this is just a tag to represent unreachable voxels / pixels
> (something like -Inf, = -2^(16-1) in your case )
> s.
>
> On Thu, Feb 26, 2009 at 2:31 PM, Baoyun Li <baoyun_li123 at yahoo.com> wrote:
> Dear All:
>
> I am trying to perform some binary morphology opetration on image with int type. My input is16 bit in with value 0 and 255.
>
> I set the binary morphology filter as suggested in the ITK example, the difference is my input and output in int 16.
>
> When I tryied to morphology closing using Dilate and erod, I filled the hole sucessfully. But I got -32768 value for the voxel between the forgournd and background.
>
> Can sombody tell what is wrong?
>
> Thanks
>
> Baoyun
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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.mandriva.org
http://www.itk.org http://www.clavier-dvorak.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090227/b1ac0a9c/attachment.htm>
More information about the Insight-users
mailing list