[Insight-users] VNLFFT vs. FFTW

Kevin H. Hobbs hobbsk at ohio.edu
Fri Aug 5 09:51:18 EDT 2011


On 08/03/2011 04:59 PM, Cory Quammen wrote:
> Kevin,
> 
> What might be happening is a side-effect of FFTW returning an image
> that is about half the image size in the first (x) dimension. The
> problem is that itk::FFTRealToComplexConjugateImageFilter will produce
> an output image of the same size if the input image has size N *or*
> size N+1 in the x-dimension. Unfortunately, you have to tell
> itk::FFTComplexConjugateToRealImageFilter whether the original real
> image input for FFTRealToComplexConjugateImageFilter has an even or
> odd size in the x-dimension using SetActualXDimensionIsOdd() for it to
> compute the output size correctly. For VNL, you don't have to do this,
> but with FFTW you do.
> 
> Can you see if adding a call to SetActualXDimensionIsOdd() fixes some
> of your problems?
> 
> Thanks,
> Cory
> 

It does not. If I switch back to using the FFTW classes and add
SetActualXDimensionIsOddOff I still get an output image that is twice
the size of the original image.

Just in case I'm doing something else stupid I'm including the source
code for both the program I use to create the mask and the program to
apply the mask.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FFT.cxx
Type: text/x-c++src
Size: 3069 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110805/9ade063a/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FFTMaskIFFT.cxx
Type: text/x-c++src
Size: 2398 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110805/9ade063a/attachment-0001.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110805/9ade063a/attachment.pgp>


More information about the Insight-users mailing list