[Insight-users] Vnl FFT investigation
Jakub Bican
jakub.bican at matfyz.cz
Thu Apr 26 07:52:33 EDT 2007
Hi,
i have investigated a little about the Vnl FFT implementation. My conclusion
is that it works quite fine, but:
1) is limited only to images with some specific sizes. I am not sure
which sizes Vnl FFT supports (i supposed either powers or multiples of two),
but function
VnlFFTRealToComplexConjugateImageFilter<TPixel,Dimension>::Legaldim(int
n)
is a little bit strange - but it may reflect what VnlFFT
needs. Finally the padding code in FFTDirectInverse.cxx is does not
reflect what Legaldim() checks.
For general usage, ITK wrapper should be able to padd the input image if
neccessary (and probably store the original size as metadata, may be in the
same way as FFTW wrapper does.)
2) Forward FFT is producing output, that is conjugate of what FFTW
(consequently Matlab) produces. Inverse FFT is counting with that so the
forward-inverse result by VnlFFT is fine. But if you do forward by VnlFFT
and inverse by FFTW (Matlab), you get flipped result. It also very probably
causes problems when there is some processing in the fourier domain.
The solution would
be to process the result of forward and input to inverse transform.
Note that these conclusions does not correspond with
FFTDirectInvers.cxxexample, so if i am wrong or i missed something,
please, let me know.
Regards,
Jakub
PS: does someone have function for reading MHD files into Matlab? I have
written something now, but it is not very "complete".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070426/1dc1d6c3/attachment.htm
More information about the Insight-users
mailing list