[Insight-users] 3D BinaryErodeImageFilter

Luis Ibanez luis.ibanez at kitware.com
Thu Jul 13 18:53:59 EDT 2006


Hi Dan,

There is nothing obviously wrong with the code that you are using.

We just verified that the binary filters are working as expected.
These filters have regression testing and they are verified nightly
in about 35 different platforms:
http://www.itk.org/Testing/Dashboard/20060713-0100-Nightly/TestDetail/__Examples_Filtering_MathematicalMorphologyBinaryFiltersTest.html


You can easily do this by checking the example:

      Insight/Examples/Filtering/
         MathematicalMorphologyBinaryFilters.cxx


Given that the code is so simple, I would rather suspect of your
process for saving the image or for visualizing the image after
the filtering is completed.

What are you doing next with the image that you
get from   binaryErode->GetOutput();    ??


   Please let us know,


     Luis



--------------------
Dan Rico wrote:
> Hi,
>  
> still waiting for an answer related to the "BinaryErodeImage" filter 
> that applied to a 3D binary image produces an output identical to the input.
> Is there a way to overcome this problem?
>  
> Thanks,
> Dan
> 
>  
> 
>     Date: Wed, 12 Jul 2006 09:21:01 -0700 (PDT)
>     From: Dan Rico <dan_rico_to at yahoo.com>
>     Subject: BinaryErodeImageFilter
>     To: insight-users at itk.org
> 
>     Hi,
>      
>     while testing the output of the "itkBinaryErodeImageFilter" on a 3D
>     binary images I found out that the output is identical to the input.
>     Does anyone have experienced similar problems with the erosion filter?
>      
>     The tests have been performed on version 2.4.1.
>      
>     Sample code:
>      
>     typedef unsigned char CharPixelType;
>     typedef itk::Image <CharPixelType, 3> Input3DImageType;
>     typedef itk::BinaryBallStructuringElement<CharPixelType, 3>
>     StructuringElementType3D;
>     typedef itk::BinaryErodeImageFilter<Input3DImageType,
>              Input3DImageType,
>              StructuringElementType3D> ErodeFilterTypeInt2Int3D;
>     ....
>      
>     inputBinaryVolume = readerBinary->GetOutput();
>      
>      unsigned char TubeRadiusSE = 2;
>      StructuringElementType3D structuringElement;
>      structuringElement.SetRadius(TubeRadiusSE);
>      structuringElement.CreateStructuringElement();
>      
>      ErodeFilterTypeInt2Int3D::Pointer binaryErode =
>     ErodeFilterTypeInt2Int3D::New();
>      binaryErode->SetKernel(structuringElement);
>      binaryErode->SetInput(inputBinaryVolume);
>      binaryErode->SetErodeValue(1);
>      binaryErode->Update();  
>      
>     Thanks,
>     Dan
>      
>      
>     ------------------------------------------------------------------------
>     Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
>     <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/>
> 
> 
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Next-gen email? Have it all with the all-new Yahoo! Mail Beta. 
> <http://us.rd.yahoo.com/evt=42241/*http://advision.webevents.yahoo.com/handraisers> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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