[Insight-users] BinaryErodeImageFilter - strange behaviour
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Tue Feb 28 08:14:09 EST 2006
Jens,
I have updated the binary erode and dilate filters. The files are
available in the insight journal or at
http://voxel.jouy.inra.fr/darcs/contrib-itk/binaryErodeDilate.
Can you test if you have the same behavior with those new files ?
Thanks,
Gaetan
On Tue, 03 Jan 2006 10:30:06 +0100, Jens Kaftan
<mailinglist at tus-wickrath.de> wrote:
> Hi Gaeton,
>
> sorry, I must have forgotten. I am using version 2.4.0.
>
> Thanks,
> Jens.
>
>>
>>
>> Hi Jens,
>>
>> Can you tell us which ITK version you're using ? The implementation of
>> BinaryErodeImageFilter have change in the 2.4 release
>>
>> Regards
>>
>> Gaetan
>>
>> On Monday 02 January 2006 19:56, mailinglist at tus-wickrath.de wrote:
>>> Hi,
>>>
>>> the behaviour of the "itkBinaryErodeImageFilter" depending on the size
>>> of
>>> the StructuringElementSize is quite strange, and I am not sure if this
>>> might be a problem with the filter of with my application. I do use an
>>> BinaryBallStructuringElement with varying radius. While the filter
>>> works
>>> most of the times as expected, there is usually one
>>> stucturingelement-size
>>> inbetween, where the filter output is exactly like the input, although
>>> this
>>> result is obviously wrong. For example:
>>> The input (binary image) is of size 10x12, while the boundary
>>> lines/columns
>>> have only zero elements. Applying an structuring element with radius=3
>>> causes that only one pixel unequal zero remains of the input image.
>>> Performing an erosion with radius=4,5,6 or radius=8,9,10 on the same
>>> input
>>> image causes logicaly that the ouput image contains only zero values.
>>> But
>>> performing an erosion with radius=7 produces an output image which is
>>> equal
>>> with the input. The same happend by using an input image of size 37x25
>>> and
>>> an structuring element with an radius of exactly 10.
>>>
>>> Following a code fragment which is supposed to show roughly the main
>>> algorithm pipeline (it is pretty much like the example within the ITK
>>> Software Guide):
>>>
>>> typedef itk::Image< unsigned int, 2 > BinaryMaskType;
>>> typedef itk::BinaryBallStructuringElement<unsigned int, 2>
>>> MorphStructuringElementType; typedef
>>> itk::BinaryErodeImageFilter<BinaryMaskType, BinaryMaskType,
>>> MorphStructuringElementType> ErodeFilterType;
>>>
>>> ErodeFilterType::Pointer binaryErode = ErodeFilterType::New();
>>> MorphStructuringElementType structuringElement;
>>> for(int radius = 1; radius<15; radius++)
>>> {
>>> binaryErode->SetInput( bbMask );
>>> structuringElement.SetRadius(radius);
>>> structuringElement.CreateStructuringElement();
>>> binaryErode->SetKernel( structuringElement );
>>> binaryErode->Update();
>>> // Now analyze the ouput...
>>> }
>>>
>>> Thanks a lot!
>>> Jens.
>>> _______________________________________________
>>> 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
More information about the Insight-users
mailing list