[Insight-developers] FFT implementations handle spacing differently
Williams, Norman K
norman-k-williams at uiowa.edu
Thu Sep 27 10:00:18 EDT 2012
This is code I wrote years ago, so I'd have stop what I'm doing and spend
a couple hours reading the code to know what was really going on. But it
sounds like the pos/orientation/spacing isn't being propogated from the
input to the FFT and by the IFFT to the output.
I would argue that this should always happen -- an image converted to the
frequency domain doesn't transform it spatially; no matter what you do in
the frequency domain, when you transform back to the spatial domain, it
should be oriented and positioned the same.
--
Kent Williams norman-k-williams at uiowa.edu
On 9/27/12 7:13 AM, "Bradley Lowekamp" <blowekamp at mail.nih.gov> wrote:
>Hello,
>
>I have compiled SimpleITK with FFTW and I am getting the following
>regression test failue:
>
>81: [ RUN ] BasicFilters.ForwardFFT_defaults
>81: Starting image compare on BasicFilters_ForwardFFT_defaults_
>81: Loading baseline
>/Users/blowekamp/src/SimpleITK/Testing/Data/Baseline/BasicFilters_ForwardF
>FT_defaults.nrrd
>81:
>/scratch/blowekamp/build/SimpleITK/SimpleITK-build/Testing/Unit/sitkForwar
>dFFTImageFilterTest.cxx:128: Failure
>81: Value of: imageCompare.compare( output, "", "" )
>81: Actual: false
>81: Expected: true
>81: ImageCompare: Failed to subtract image
>/Users/blowekamp/src/SimpleITK/Testing/Data/Baseline/BasicFilters_ForwardF
>FT_defaults.nrrd because:
>/scratch/blowekamp/build/SimpleITK/ITK-prefix/include/ITK-4.2/itkImageToIm
>ageFilter.hxx:243:
>81: itk::ERROR: SubtractImageFilter(0x7ffe943009e0): Inputs do not occupy
>the same physical space!
>81: InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00],
>InputImageIndexedDataObject1 Origin: [2.8345293e-01, 2.8345293e-01,
>2.8345293e-01]
>81: Tolerance: 1.0000000e-06
>81: InputImage Spacing: [1.0000000e+00, 1.0000000e+00, 1.0000000e+00],
>InputImageIndexedDataObject1 Spacing: [7.5587445e-01, 7.5587445e-01,
>7.5587445e-01]
>81: Tolerance: 1.0000000e-06
>
>
>This is telling me that the vnl and the FFTW implementation of the
>ForwardFFT image filter are handling the spacing different. The second
>input is the baseline originating from the Vnl FFT implementation, while
>the one from FFTW still has the default origin and spacing. However, I am
>uncertain that this actually make sense, as the FFTForward filter does
>converts from the spacial domain to the frequency this physical
>information may not be very logical.
>
>What should the correct behavior be?
>
>Thanks,
>Brad
>
>ps
>Please note that this exception is coming from the cumbersome standard
>check in the ImageToImageFilter during comparison to the baseline. And
>it's revealing a true bug.
>_______________________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://kitware.com/products/protraining.php
>
>Please keep messages on-topic and check the ITK FAQ at:
>http://www.itk.org/Wiki/ITK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.itk.org/mailman/listinfo/insight-developers
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list