[Insight-users] problems with itkErode/DilateImageFilters

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Dec 16 10:07:01 EST 2008


Le 16 déc. 08 à 15:09, Corinna Vehlow a écrit :

> Hi Gaëtan,
>
> thank you very much for the fast response.
>
> On 16 Dec 2008, at 11:54 AM, Gaëtan Lehmann wrote:
>> Hi Corinna,
>> A few questions and notes!
>> Are you using the ITK_USE_CONSOLIDATED_MORPHOLOGY option?
>
> No I don't. Were do I have to set this option, in the makefile?
>

you can find it in the advanced options - it changes the filter for  
more optimized ones, but probably not as well tested.


>>
>> Do you have the same problem when using the  
>> GrayscaleMorphologicalClosingImageFilter directly?
>
> I've tried the Closing image filter before, but it's not working at  
> all (the whole image is colored and labeled) and I decided to  
> perform the single operations, because I use a bigger radius for the  
> dilation than for the erosion, because when I used the same kernel  
> size, the objects became smaller, as if the erosion has a stronger  
> effect than dilation, although using the same kernel.
>
>> You're doing post-processing, so I guess you are working on binary/ 
>> labeled images. Have you tried with the binary dilate/erode/closing  
>> filter instead of the grayscale ones?
>
> I have the problems with all of these filter- types: itkErode/ 
> DilateObjectMorphologyImageFilter.h and itkGrayscaleErode/ 
> DilateImageFilter.h and itkBinaryErode/DilateImageFilter
> When using the grey scale filter the regions are shrinking or  
> disappearing. When I use the object morphology or binary filter, the  
> output looks the same, as without performing post-processing, as if  
> nothing happened at all!
>
>>
>> Can you provide a minimal example, so we would be able to reproduce  
>> and (hopefully) fix the problem?
>
> What do you mean with minimal example? Should I send you a test  
> scene and the source code of my plugin?

I mean a small example that we can build easily alone (without  
building slicer for example). The smallest is the best, as it makes  
easier to localize the problem.
Your code would be a great help, to begin.

Based on the random behavior you describe, I would think that you  
haven't properly initialized your structuring element.
Have you called the CreateStructuringElement() method every time you  
use a different structuring element size?

Regards,

Gaëtan

>
> Regards
> Corinna
>
>>
>>
>> Regards,
>>
>> Gaëtan
>>
>> -- 
>> 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
>>
>> Le 16 déc. 08 à 12:29, Corinna Vehlow a écrit :
>>
>>> Hello everybody,
>>>
>>> I actually working at the Institute of Cancer Research on the  
>>> development of a plugin for the Slicer3 open source tool for  
>>> tumour segmentation. I'm using morphological operations as post- 
>>> processing to fill small gaps etc. I've tried the   
>>> itkGrayscaleErode/DilateImageFilter.h and itkErode/ 
>>> DilateObjectMorphologyImageFilter.h , both worked pretty well on  
>>> Windows, but now that I got a new machine (a MAC) at my workplace,  
>>> some problems occur. The results are not the same in every case in  
>>> comparison to the segmentation output, when running the tool under  
>>> Windows. The segmentation results without any morphological  
>>> operations are the same, but with post-processing they are not. My  
>>> post-processing consists of a dilation first and erosion as second  
>>> operation (so closing). The weird thing is, that as long as I run  
>>> my region growing segmentation on a few number of seed points  
>>> (max. 4), the morphological operations are working correctly, and  
>>> the results of the post-processing are the same, as under Windows.  
>>> But if I select more then 4 (it doesn't matter which one I  
>>> select), the labels (segmented regions) are shrinking extremely  
>>> instead of growing or even disappearing at all, if the region is  
>>> small. Some times the whole label-map is empty after post- 
>>> processing.
>>>
>>> Can anybody help me or tell my how to fix this?
>>>
>>> Thanks a lot!
>>
>>
>>
>
>
> The Institute of Cancer Research: Royal Cancer Hospital, a  
> charitable Company Limited by Guarantee, Registered in England under  
> Company No. 534147 with its Registered Office at 123 Old Brompton  
> Road, London SW7 3RP.
>
> This e-mail message is confidential and for use by the addressee  
> only. If the message is received by anyone other than the addressee,  
> please return the message to the sender by replying to it and then  
> delete the message from your computer and network.

-- 
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: This is a digitally signed message part
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081216/2e315e8a/attachment.pgp>


More information about the Insight-users mailing list