pyushkevich / c3d

Convert3D tool
GNU General Public License v3.0
32 stars 16 forks source link

Building C3D on Ubuntu 20.04 #6

Open cepa995 opened 3 years ago

cepa995 commented 3 years ago

I am trying to build C3D on Ubuntu 20.04 and I am using latest ITK version for it. But once I configure the build and try to make -j5 I get following error:

stefan@stefan-VirtualBox:~/c3d_test/c3d/build$ export CMAKE_PREFIX_PATH=$HOME/c3d_test/itk-c3d-install/usr/local
stefan@stefan-VirtualBox:~/c3d_test/c3d/build$ cmake ..
--    CPACK_SYSTEM_NAME Linux-x86_64
--    CPACK_PACKAGE_FILE_NAME c3d-1.1.0-Linux-x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefan/c3d_test/c3d/build
stefan@stefan-VirtualBox:~/c3d_test/c3d/build$ make -j5
Scanning dependencies of target ITKVoxBoIO
Scanning dependencies of target markdown_to_hex
Scanning dependencies of target cnd_maxflow
Scanning dependencies of target cnd_adapters
Scanning dependencies of target ITKPovRayIO
[  1%] Building C object CMakeFiles/markdown_to_hex.dir/utilities/hexdump.c.o
[  2%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/GCoptimization.cpp.o
[  3%] Building CXX object itkextras/VoxBoIO/CMakeFiles/ITKVoxBoIO.dir/itkVoxBoCUBImageIO.cxx.o
[  3%] Building CXX object itkextras/PovRayIO/CMakeFiles/ITKPovRayIO.dir/itkPovRayDF3ImageIO.cxx.o
[  4%] Linking C executable markdown_to_hex
[  4%] Built target markdown_to_hex
Scanning dependencies of target cnd_api
[  5%] Building CXX object CMakeFiles/cnd_api.dir/api/ConvertAPI.cxx.o
[  6%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/LinkedBlockList.cpp.o
[  6%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/graph.cpp.o
[  7%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/maxflow.cpp.o
[  8%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AddImages.cxx.o
[  9%] Linking CXX static library libcnd_maxflow.a
[  9%] Built target cnd_maxflow
[ 10%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AlignByLandmarks.cxx.o
[ 11%] Building CXX object itkextras/PovRayIO/CMakeFiles/ITKPovRayIO.dir/itkPovRayDF3ImageIOFactory.cxx.o
[ 11%] Linking CXX static library libcnd_api.a
[ 11%] Built target cnd_api
Scanning dependencies of target markdown_docs
[ 12%] Generating markdown_docs.h
[ 13%] Building CXX object itkextras/VoxBoIO/CMakeFiles/ITKVoxBoIO.dir/itkVoxBoCUBImageIOFactory.cxx.o
[ 13%] Built target markdown_docs
[ 13%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AntiAliasImage.cxx.o
[ 14%] Linking CXX static library libITKPovRayIO.a
[ 14%] Built target ITKPovRayIO
Scanning dependencies of target cnd_driver
[ 15%] Building CXX object CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o
[ 16%] Linking CXX static library libITKVoxBoIO.a
[ 16%] Built target ITKVoxBoIO
[ 17%] Building CXX object CMakeFiles/cnd_driver.dir/utilities/doc/Documentation.cxx.o
[ 18%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/ApplyMetric.cxx.o
[ 19%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/BinaryHoleFill.cxx.o
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In member function ‘int ImageConverter<TPixel, VDim>::ProcessCommand(int, char**)’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:463:14: error: ‘vcl_acos’ was not declared in this scope
  463 |     adapter(&vcl_acos);
      |              ^~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:516:14: error: ‘vcl_asin’ was not declared in this scope
  516 |     adapter(&vcl_asin);
      |              ^~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:645:14: error: ‘vcl_cos’ was not declared in this scope
  645 |     adapter(&vcl_cos);
      |              ^~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:736:14: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’?
  736 |     adapter(&vcl_exp);
      |              ^~~~~~~
      |              ldexp
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1005:14: error: ‘vcl_log’ was not declared in this scope
 1005 |     adapter(&vcl_log);
      |              ^~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1012:14: error: ‘vcl_log10’ was not declared in this scope
 1012 |     adapter(&vcl_log10);
      |              ^~~~~~~~~
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In member function ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*)’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:33: error: there are no arguments to ‘vcl_sqrt’ that depend on a template parameter, so a declaration of ‘vcl_sqrt’ must be available [-fpermissive]
  446 |     const double denom = -1.0 * vcl_sqrt(sff * smm );
      |                                 ^~~~~~~~
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:33: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1257:11: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’?
 1257 |     exp1(&vcl_exp);
      |           ^~~~~~~
      |           ldexp
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1753:14: error: ‘vcl_sin’ was not declared in this scope
 1753 |     adapter(&vcl_sin);
      |              ^~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1837:14: error: ‘vcl_sqrt’ was not declared in this scope
 1837 |     adapter(&vcl_sqrt);
      |              ^~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In member function ‘int ImageConverter<TPixel, VDim>::ProcessCommandLine(int, char**)’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2143:8: error: ‘itk::MultiThreader’ has not been declared
 2143 |   itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1);
      |        ^~~~~~~~~~~~~
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 2; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 2> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 2> >]’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:468:16:   required from here
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope
  446 |     const double denom = -1.0 * vcl_sqrt(sff * smm );
      |                                 ~~~~~~~~^~~~~~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 2]’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2959:16:   required from here
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’?
 2386 |         if (!vnl_math_isnan(*q))
      |              ~~~~~~~~~~~~~~^~~~
      |              vnl_math_h_
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 3; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 3> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 3> >]’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:469:16:   required from here
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 3]’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2960:16:   required from here
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’?
 2386 |         if (!vnl_math_isnan(*q))
      |              ~~~~~~~~~~~~~~^~~~
      |              vnl_math_h_
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 4; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 4> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 4> >]’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:470:16:   required from here
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 4]’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2961:16:   required from here
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’?
 2386 |         if (!vnl_math_isnan(*q))
      |              ~~~~~~~~~~~~~~^~~~
      |              vnl_math_h_
make[2]: *** [CMakeFiles/cnd_driver.dir/build.make:63: CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:482: CMakeFiles/cnd_driver.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 20%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/BiasFieldCorrectionN4.cxx.o
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In member function ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()()’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:7: error: there are no arguments to ‘vcl_ceil’ that depend on a template parameter, so a declaration of ‘vcl_ceil’ must be available [-fpermissive]
   71 |       vcl_ceil( domain / splineDistance ) );
      |       ^~~~~~~~
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 2]’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:225:16:   required from here
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope
   71 |       vcl_ceil( domain / splineDistance ) );
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 3]’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:226:16:   required from here
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 4]’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:227:16:   required from here
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope
make[2]: *** [CMakeFiles/cnd_adapters.dir/build.make:102: CMakeFiles/cnd_adapters.dir/adapters/ApplyMetric.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/cnd_adapters.dir/build.make:128: CMakeFiles/cnd_adapters.dir/adapters/BiasFieldCorrectionN4.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:787: CMakeFiles/cnd_adapters.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Is this caused due to using wrong compiler or ITK version, or perhaps something else?

pyushkevich commented 3 years ago

Hi,

Are you building using ITKv5? If so, there is the itk5 branch of c3d that you should checkout using git. The master branch only builds against ITKv4 (for now, I will probably merge soon).

Thanks, Paul

On Mon, Mar 29, 2021 at 9:25 AM cepa995 @.***> wrote:

I am trying to build C3D on Ubuntu 20.04 and I am using latest ITK version for it. But once I configure the build and try to make -j5 I get following error:

@.***VirtualBox:~/c3d_test/c3d/build$ export CMAKE_PREFIX_PATH=$HOME/c3d_test/itk-c3d-install/usr/local

@.***VirtualBox:~/c3d_test/c3d/build$ cmake ..

-- CPACK_SYSTEM_NAME Linux-x86_64

-- CPACK_PACKAGE_FILE_NAME c3d-1.1.0-Linux-x86_64

-- Configuring done

-- Generating done

-- Build files have been written to: /home/stefan/c3d_test/c3d/build

@.***VirtualBox:~/c3d_test/c3d/build$ make -j5

Scanning dependencies of target ITKVoxBoIO

Scanning dependencies of target markdown_to_hex

Scanning dependencies of target cnd_maxflow

Scanning dependencies of target cnd_adapters

Scanning dependencies of target ITKPovRayIO

[ 1%] Building C object CMakeFiles/markdown_to_hex.dir/utilities/hexdump.c.o

[ 2%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/GCoptimization.cpp.o

[ 3%] Building CXX object itkextras/VoxBoIO/CMakeFiles/ITKVoxBoIO.dir/itkVoxBoCUBImageIO.cxx.o

[ 3%] Building CXX object itkextras/PovRayIO/CMakeFiles/ITKPovRayIO.dir/itkPovRayDF3ImageIO.cxx.o

[ 4%] Linking C executable markdown_to_hex

[ 4%] Built target markdown_to_hex

Scanning dependencies of target cnd_api

[ 5%] Building CXX object CMakeFiles/cnd_api.dir/api/ConvertAPI.cxx.o

[ 6%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/LinkedBlockList.cpp.o

[ 6%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/graph.cpp.o

[ 7%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/maxflow.cpp.o

[ 8%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AddImages.cxx.o

[ 9%] Linking CXX static library libcnd_maxflow.a

[ 9%] Built target cnd_maxflow

[ 10%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AlignByLandmarks.cxx.o

[ 11%] Building CXX object itkextras/PovRayIO/CMakeFiles/ITKPovRayIO.dir/itkPovRayDF3ImageIOFactory.cxx.o

[ 11%] Linking CXX static library libcnd_api.a

[ 11%] Built target cnd_api

Scanning dependencies of target markdown_docs

[ 12%] Generating markdown_docs.h

[ 13%] Building CXX object itkextras/VoxBoIO/CMakeFiles/ITKVoxBoIO.dir/itkVoxBoCUBImageIOFactory.cxx.o

[ 13%] Built target markdown_docs

[ 13%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AntiAliasImage.cxx.o

[ 14%] Linking CXX static library libITKPovRayIO.a

[ 14%] Built target ITKPovRayIO

Scanning dependencies of target cnd_driver

[ 15%] Building CXX object CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o

[ 16%] Linking CXX static library libITKVoxBoIO.a

[ 16%] Built target ITKVoxBoIO

[ 17%] Building CXX object CMakeFiles/cnd_driver.dir/utilities/doc/Documentation.cxx.o

[ 18%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/ApplyMetric.cxx.o

[ 19%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/BinaryHoleFill.cxx.o

/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In member function ‘int ImageConverter<TPixel, VDim>::ProcessCommand(int, char**)’:

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:463:14: error: ‘vcl_acos’ was not declared in this scope

463 | adapter(&vcl_acos);

  |              ^~~~~~~~

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:516:14: error: ‘vcl_asin’ was not declared in this scope

516 | adapter(&vcl_asin);

  |              ^~~~~~~~

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:645:14: error: ‘vcl_cos’ was not declared in this scope

645 | adapter(&vcl_cos);

  |              ^~~~~~~

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:736:14: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’?

736 | adapter(&vcl_exp);

  |              ^~~~~~~

  |              ldexp

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1005:14: error: ‘vcl_log’ was not declared in this scope

1005 | adapter(&vcl_log);

  |              ^~~~~~~

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1012:14: error: ‘vcl_log10’ was not declared in this scope

1012 | adapter(&vcl_log10);

  |              ^~~~~~~~~

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In member function ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*)’:

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:33: error: there are no arguments to ‘vcl_sqrt’ that depend on a template parameter, so a declaration of ‘vcl_sqrt’ must be available [-fpermissive]

446 | const double denom = -1.0 vcl_sqrt(sff smm );

  |                                 ^~~~~~~~

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:33: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1257:11: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’?

1257 | exp1(&vcl_exp);

  |           ^~~~~~~

  |           ldexp

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1753:14: error: ‘vcl_sin’ was not declared in this scope

1753 | adapter(&vcl_sin);

  |              ^~~~~~~

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1837:14: error: ‘vcl_sqrt’ was not declared in this scope

1837 | adapter(&vcl_sqrt);

  |              ^~~~~~~~

/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In member function ‘int ImageConverter<TPixel, VDim>::ProcessCommandLine(int, char**)’:

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2143:8: error: ‘itk::MultiThreader’ has not been declared

2143 | itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1);

  |        ^~~~~~~~~~~~~

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 2; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 2> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 2> >]’:

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:468:16: required from here

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope

446 | const double denom = -1.0 vcl_sqrt(sff smm );

  |                                 ~~~~~~~~^~~~~~~~~~~~

/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 2]’:

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2959:16: required from here

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_mathh’?

2386 | if (!vnl_math_isnan(*q))

  |              ~~~~~~~~~~~~~~^~~~

  |              vnl_math_h_

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 3; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 3> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 3> >]’:

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:469:16: required from here

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope

/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 3]’:

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2960:16: required from here

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_mathh’?

2386 | if (!vnl_math_isnan(*q))

  |              ~~~~~~~~~~~~~~^~~~

  |              vnl_math_h_

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 4; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 4> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 4> >]’:

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:470:16: required from here

/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope

/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 4]’:

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2961:16: required from here

/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_mathh’?

2386 | if (!vnl_math_isnan(*q))

  |              ~~~~~~~~~~~~~~^~~~

  |              vnl_math_h_

make[2]: *** [CMakeFiles/cnd_driver.dir/build.make:63: CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o] Error 1

make[1]: *** [CMakeFiles/Makefile2:482: CMakeFiles/cnd_driver.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

[ 20%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/BiasFieldCorrectionN4.cxx.o

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In member function ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()()’:

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:7: error: there are no arguments to ‘vcl_ceil’ that depend on a template parameter, so a declaration of ‘vcl_ceil’ must be available [-fpermissive]

71 | vcl_ceil( domain / splineDistance ) );

  |       ^~~~~~~~

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 2]’:

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:225:16: required from here

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope

71 | vcl_ceil( domain / splineDistance ) );

  |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 3]’:

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:226:16: required from here

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 4]’:

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:227:16: required from here

/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope

make[2]: *** [CMakeFiles/cnd_adapters.dir/build.make:102: CMakeFiles/cnd_adapters.dir/adapters/ApplyMetric.cxx.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: *** [CMakeFiles/cnd_adapters.dir/build.make:128: CMakeFiles/cnd_adapters.dir/adapters/BiasFieldCorrectionN4.cxx.o] Error 1

make[1]: *** [CMakeFiles/Makefile2:787: CMakeFiles/cnd_adapters.dir/all] Error 2

make: *** [Makefile:163: all] Error 2

Is this caused due to using wrong compiler or ITK version, or perhaps something else?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pyushkevich/c3d/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPEW4A5T7YFJVH36L2Z6LTGCEWZANCNFSM4Z7SZAXA .

-- Paul A. Yushkevich, Ph.D. Professor of Radiology Penn Image Computing and Science Laboratory University of Pennsylvania Perelman School of Medicine

cepa995 commented 3 years ago

I was using ITKv5. Thank you so much for your time! This helped :)

carandraug commented 9 months ago

I tried the itk5 branch but that failed to build with ITK 5.2.1 (Debian 12). I've made pull request #33 against master to add support to build with itk5.