[Insight-users] RecursiveSeparableImageFilter and ReconstructionImageFilter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Sep 3 05:43:00 EDT 2008


Le 3 sept. 08 à 11:29, Julien Michel a écrit :

> Tom Vercauteren a écrit :
>> Hi Julien,
>> As far as I understand it, RecursiveSeparableImageFilter should be
>> recursive and separable meaning that (for a 2D image) the filter  
>> first
>> requires entire lines and then requires entire columns. It can thus
>> not easily benefit from streaming (even though it could be
>> multithreaded).
>> If the filter needs to be run in one direction only, it should  
>> however
>> be possible to do streaming with regions split in the other  
>> direction.
>> Regards,
>> Tom
>
> Hi Tom, Hi Gaetan,
>
> Thanks a lot for your replies. I understand that streaming is not  
> straightforward for these implementations. I think I'll have a look  
> at the algorithms and publications used to better understand how it  
> is working.
>
> My naive idea is that to compute a gradient, or the opening by  
> reconstruction, for a given pixel, you should not need pixels that  
> are 30 000 pixels away from it. So, given a subregion of the input  
> image, there must be a minimal region where values of the gradient  
> on the full image and on the subregion are equivalent. The question  
> is how to determine this minimal region. If we know how to to do it,  
> with a litle overlapping we should be able to turn a lot of filter  
> streamable, which would be very useful (especially for us).


But, with a restricted region, we can't ensure that the result would  
be exactly the same than with the full image, which is what ITK expect.

If that not exact result for you, you may want to subclass those  
classes to make them work on smaller region. Another option is to  
write an UnsafeStreamingImageFilter (or something of that kind) which  
would run a filter on a small part of an image, even if it requires  
the full input. This new filter would take a itk::ImageToImageFilter  
as input, so it would be able to take the recursive gaussian or the  
reconstruction filter as input.

That would also make a nice contribution to the insight journal :-)

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

-------------- 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/20080903/1e99000c/attachment.pgp>


More information about the Insight-users mailing list