Hi All,
I’ve been trying to use the FFTWComplexToComplexFFTImageFilter filter, but get linker errors:
CMakeFiles/TestFFTW.dir/TestFFTW.cxx.o:(.rodata._ZTVN3itk30ComplexToComplexFFTImageFilterINS_5ImageISt7complexIfELj3EEEEE[_ZTVN3itk30ComplexToComplexFFTImageFilterINS_5ImageISt7complexIfELj3EEEEE]+0x258): undefined reference to `itk::ComplexToComplexFFTImageFilter<itk::Image<std::complex<float>, 3u> >::GenerateInputRequestedRegion()'
CMakeFiles/TestFFTW.dir/TestFFTW.cxx.o:(.rodata._ZTVN3itk34FFTWComplexToComplexFFTImageFilterINS_5ImageISt7complexIfELj3EEEEE[_ZTVN3itk34FFTWComplexToComplexFFTImageFilterINS_5ImageISt7complexIfELj3EEEEE]+0x258): undefined reference to `itk::ComplexToComplexFFTImageFilter<itk::Image<std::complex<float>, 3u> >::GenerateInputRequestedRegion()'
I’ve tested this with ITK 4.10 and the latest release 4.13 (compiled with ITK_USE_FFTWF turned on, and get the same result if I turn ITK_USE_SYSTEM_FFTW ON or OFF).
This is the test code I use:
#include "itkImage.h"
#include <iostream>
#include "itkFFTWComplexToComplexFFTImageFilter.h"
int main()
{
typedef std::complex<float> CplxPixelType;
typedef itk::Image<CplxPixelType, 3> CplxImageType;
typedef itk::FFTWComplexToComplexFFTImageFilter<CplxImageType> FFTWComplexToComplexFilterType;
typename FFTWComplexToComplexFilterType::Pointer m_CplxToCplxFFT = FFTWComplexToComplexFilterType::New();
return 0;
}
with CMakeLists:
cmake_minimum_required(VERSION 2.8)
project(TestFFTW)
# Find ITK.
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
add_executable(TestFFTW TestFFTW.cxx )
target_link_libraries(TestFFTW ${ITK_LIBRARIES})
Any suggestions on what could be causing this issue?
Thanks
-Pierrick