[Insight-users] fast binary dilate image filter

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Mon Sep 5 08:47:29 EDT 2005


On Mon, 05 Sep 2005 12:14:07 +0200, SCHMID, Jerome  
<jeromeschmid at surgery.cuhk.edu.hk> wrote:

> Hi Gaetan,
>
> Pleased to see that you've found the courage to implement the erosion  
> version, I cannot remember if the erosion version was so straightforward.
>
> Concerning the threading aspect of my filter I am not sure that it works  
> 100%, probably some deeper tests should be done (if you have some  
> time...).
>
> Concerning you changes, I don't understand what do you mean by
> "it require a larger input region to operate without border effects".  
> The dilate version already performed this enlargement, by calling the  
> GenerateInputRequestedRegion() function...

the input region must be increase by the kernel radius for erosion. If  
this larger region is not used, in case of a smaller requested region than  
available one, border artifact than the one we have near the real border  
of the image.

>
> Of course the best implementation would be a piece of code shared by  
> both erosion and dilation. For opening and closing I don't know now if  
> it is so easy to implement a similar fast code. Unfortunately, currently  
> I haven't time to take care about it.

the same for me... it will have to wait, unless someoneelse want to do the  
work.
Anyway, even without threads, it works very well for me :-)

>
> Best Regards,
>
> Jerome Schmid
>
> -----------------------------------
> Jerome SCHMID
> Project Manager/ Engineer
> Augmented and Virtual Reality
> MIS Centre
> Prince of Wales Hospital
> Chinese University Of Hong-Kong
> -----------------------------------
>
>
>
> -----Original Message-----
> From: Gaetan Lehmann [mailto:gaetan.lehmann at jouy.inra.fr]
> Sent: Mon 9/5/2005 3:18 PM
> To: SCHMID, Jerome; insight-users at itk.org
> Subject: Re: [Insight-users] fast binary dilate image filter
>
> Hi Jerome,
>
> I have made some changes to your filter to transform it in a fast erosion
> filter. It's great to see that there is a threaded version, but it mean
> that the work to have a fast erosion need to be done again :-(
> There are only a few differences:
>   + the filter dilate the background instead of the foreground
>   + it require a larger input region to operate without border effects
>   + it requires a background value. It is already implemented in the  
> dilate
> version, but I can't see any case where it will be used: dilation will
> never add background pixels
>
> Perhap's instead of changing again the code of your filter, a common  
> class
> or template can be developed and be used by erosion and dilation ? Also,
> perhap's this common class can be used to implement more efficient  
> opening
> and closing than just running sequencially dilation and erosion ?
>
> Regards,
>
> Gaetan
>
> PS: BinaryErodeImageFilter (a modified version of
> FastIncrementalBinaryDilateImageFilter),
> BinaryMorphologicalOpeningImageFilter and
> BinaryMorphologicalClosingImageFilter are available at
> http://voxel.jouy.inra.fr/darcs/itk-mima2/Insight/Code/BasicFilters/ if
> you want to have a look at them
>
> On Fri, 02 Sep 2005 06:27:40 +0200, SCHMID, Jerome
> <jeromeschmid at surgery.cuhk.edu.hk> wrote:
>
>> Hi,
>>
>> After a long time I am back to the itk list as I find a job elsewhere.
>> Anyway this is not the topic of the mail...
>>
>> It concerns a filter I wrote on fast binary dilation for itk. At that
>> time ( about 1 year ago... ) I was speaking with James Miller about
>> this. Before I quit my previous job the filter hadn't been fully
>> reviewed or validated, I thought that it was lost :-)
>>
>> Anyway I found a thread about this filter in last April (yeah sorry to
>> talk about old things),
>>
>> http://public.kitware.com/pipermail/insight-users/2005-April/012583.html
>>
>> and I discover with pleasure that the filter has been integrated by
>> James. However James wonder if I made some modifications to it since.
>> The answer is no as I haven't access now to my previous work.
>>
>> However I wonder if James tried to test the threadable aspect of the
>> filter that I implemented at that time. The last version of the filter I
>> submited should be in the old following thread:
>>
>> http://public.kitware.com/pipermail/insight-users/2004-September/010538.html
>>
>> Our concern was the safety of some operations. At that time I tested it
>> and it seemed to work. The current implementation
>> itk::FastIncrementalBinaryDilateImageFilter hasn't the threadable aspect
>> available.
>>
>> I hope I can find the time one day to have a deeper look on it.
>>
>> Best Regards,
>>
>> Jerome Schmid
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>
>
>



-- 
Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr>
Tel: +33 1 34 65 29 66
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
Web: http://voxel.jouy.inra.fr


More information about the Insight-users mailing list