[Insight-users] Re: [Insight-developers] filter with output size depending on the content of the input image

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu May 24 11:15:28 EDT 2007


Le 22 mai 07 à 14:39, Peter Cech a écrit :

> On Tue, May 22, 2007 at 12:15:33 +0200, Gaëtan Lehmann wrote:
>>
>> Hi,
>>
>> Is it possible to implement a subclass of ImageToImageFilter with the
>> size of the output image depending of the content of the input image,
>> and not only of the size of the input image.
>> I think to make an auto crop filter filter for example, or a mask
>> filter wich keep only the image in the region masked and remove the
>> empty borders.
>
> I managed to create an auto crop filter. It calls Update on the  
> upstream
> object before computing output size. The sources are in reasonable  
> shape
> (http://www.vision.ee.ethz.ch/~pcech/itkAutoCropImageFilter/ if you  
> want
> to have a look/test it), but I did not finished the pdf for IJ
> submission yet.

Your filter looks really nice and flexible — you should really think  
to submit it to the insight journal.

Just a question before implementing the mask filter the same way: can  
someone check the Peter's implementation, and confirm it is totally  
safe?

Thanks,

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070524/68acae0e/PGP.pgp


More information about the Insight-users mailing list