[Insight-users] Image filter whose output size depends on input image data

Luis Ibanez luis.ibanez at kitware.com
Mon Aug 22 19:35:54 EDT 2005


Hi Peter,

The GenerateOutputInformation() method, is the appropriate
place for performing this calculation.

You are correct in pointing out that at the moment of execution
of this method, there is not yet a fully-formed image in the
input,...but... the negotiations for the image size are done
at that point (independently of the actual image-pixel content).

You don't want to modify the size of the output image in the
GenerateData() method. At that point, it is too late for resizing
the output image.


Please let us know if you find any difficulties with the
implementation of your filter.

Regards


    Luis


------------------
Peter Cech wrote:
> Hi,
> 
> I'm trying to write autocrop image filter, but I got stuck on following
> problem. My filter needs examine input image data in order to set output
> image size. From what I understood reading ITK Software Guide, the
> correct place to set output image size is GenerateOutputInformation(),
> but at that point input image data are not yet available. The first step
> where input image data are available is GenerateData(). Is it possible
> (safe) to change output image size there?
> 
> Regards,
> Peter Cech
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 



More information about the Insight-users mailing list