[Insight-users] Binary Morphology get output with 3 values ( 0 255 -32768)

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Feb 27 10:49:51 EST 2009


Le 27 févr. 09 à 16:30, Baoyun Li a écrit :

> 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,

You shouldn't have to look at the source code to learn about the API,  
if you read the doxygen documentation. For example, the  
SetBackgroundValue() is listed in BinaryErodeImageFilter's page:

http://www.itk.org/Doxygen/html/classitk_1_1BinaryErodeImageFilter.html

>
> If I itkSetMacro(BackgroundValue, OutputPixelType) defined in some  
> filter, I can used filter->SetBackgrouValue() to set the value. Is  
> it true?

yes :-)

Gaëtan



>
>
> 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
>
>
>

-- 
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 --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090227/002b344e/attachment.pgp>


More information about the Insight-users mailing list