[Insight-developers] Problems with resizing filter output
Miller, James V (Research)
millerjv at crd . ge . com
Mon, 8 Sep 2003 10:52:55 -0400
Did you look at what ExpandImageFilter does for small input to
large output case?
It overrides two methods GenerateOutputInformation() and
GenerateInputRequestedRegion().
> -----Original Message-----
> From: Kent Williams [mailto:norman-k-williams at uiowa . edu]
> Sent: Thursday, September 04, 2003 2:15 PM
> To: Insight Developers List
> Subject: [Insight-developers] Problems with resizing filter output
>
>
> I'm trying to implement a pair of filters for doing FFT and
> IFFT operations,
> the idea being that the FFT filter takes a image of real type
> as input and
> produces an image of complex type as output. The IFFT does
> the opposite.
>
> The FFT operation's output has a smaller size than the input --
> N div 2 + 1 complex numbers for the One-Dimensional FFT, and
> Dim(1) x Dim(2) x
> (Dim(n) div 2 + 1) for the general case. So I used the
> itk:ShrinkImageFilter as a pattern for dealing with changing
> the output image
> size. itk:ShrinkImageFilter overrides
> UpdateOutputInformation to change the
> size of the output image, so I did the same in my FFT
> Real-to-Complex filter
> and IFFT Complex-to-Real filter.
>
> Going from a large input to smaller output works fine, but
> the converse does
> not. The PropagateRequestedRegion method throws an
> exception, because it
> wants to request an input region that's larger than the input
> image supports.
> Overriding UpdateOutputInformation does successfully set the
> size of the
> output image to be larger than the input image, but this
> apparently has the
> side effect of requestiong an input region the same size as
> the larger output
> region.
>
> So the question is this: How do I let the filter pipeline
> know that I only
> need as much data as is in the smaller input Image source?
>
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk . org
> http://www . itk . org/mailman/listinfo/insight-developers
>