[Insight-developers] Problems with resizing filter output
Kent Williams
norman-k-williams at uiowa . edu
Thu, 4 Sep 2003 13:14:58 -0500
I'm trying to implement a pair of filters for doing FFT and IFFT operatio=
ns,=20
the idea being that the FFT filter takes a image of real type as input an=
d=20
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 -- =20
N div 2 + 1 complex numbers for the One-Dimensional FFT, and Dim(1) x Dim=
(2) x=20
(Dim(n) div 2 + 1) for the general case. So I used the=20
itk:ShrinkImageFilter as a pattern for dealing with changing the output i=
mage=20
size. itk:ShrinkImageFilter overrides UpdateOutputInformation to change =
the=20
size of the output image, so I did the same in my FFT Real-to-Complex fil=
ter=20
and IFFT Complex-to-Real filter.
Going from a large input to smaller output works fine, but the converse d=
oes=20
not. The PropagateRequestedRegion method throws an exception, because it=
=20
wants to request an input region that's larger than the input image suppo=
rts. =20
Overriding UpdateOutputInformation does successfully set the size of the=20
output image to be larger than the input image, but this apparently has t=
he=20
side effect of requestiong an input region the same size as the larger ou=
tput=20
region.
So the question is this: How do I let the filter pipeline know that I onl=
y=20
need as much data as is in the smaller input Image source?