[Insight-users] Fast binary morphology dilation filter streamable and threadable

jerome schmid jerome.schmid at ircad.u-strasbg.fr
Wed Sep 29 11:05:54 EDT 2004


Hi itk users,

For those who remember, I proposed a time ago a fast implementation of
binary dilation. This filter is faster than itk one and works for non
centered structuring element. However the filter was not threadable and the
streaming support seemed not correct.

Thanks to the help of James Miller I have tried to improve it. Now the
filter supports threading and streaming. Well I have tested it on 2D and 3D
data, and it seems to work. So obviously I post it if somebody is interested
on test it or use it.

I have tried this time to have a more "itk like" coding. Note that forcing
the filter to work in threaded environment ( using SetNumberOfThreads()
function ) whereas parallel processing is not available may produce a filter
longer in terms of time than a single-threaded one. The reason is that some
redundant computing is done in case of threads and it is actually difficult
to remove the redundancy. But if parallel processing is possible the time
saved by parallel processing must be bigger than the redundancy time.

James,I haven't yet create a common interface for dilation and erosion as
you proposed previously. If the current filter suits to you I could
eventually try to do it. I have joined to this email a little prgm and an
image for test the filter. In this program you can enable/disable threading
or requested region setting thanks to simple #define. The requested region
is interesting because you can see the effect of element which are outside
current requested region: they may paint elements on the current requested
region. You will also notice that objects #1..,#j which have not a value
equal to the dilate value are not dilated.

As SE is a unique ON pixel in position (0, 3), the dilation is a shift in
left direction.

Regards,

Jerome Schmid




-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkFastBinaryDilation.zip
Type: application/octet-stream
Size: 13991 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040929/dcf11a01/itkFastBinaryDilation.obj


More information about the Insight-users mailing list