ITK build fixes - 3dct/open_iA GitHub Wiki

Note: All the issues mentioned below are addressed in the latest version of ITK, so it's recommended to just go with those. The hints are here just in case you have to stick to some older versions:

< 4.10, g++ 4.6 or older [LINUX]

You need to fix VCL the compilation for C++11 (see http://641blog.blogspot.co.at/2012/05/problems-with-itk-vxl-and-g-461.html). Edit the file Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h.in

  • Locate the line //#define VCL_CAN_STATIC_CONST_INIT_INT 0 /* not allowed */ and uncomment
  • Locate the line //#define VCL_CAN_STATIC_CONST_INIT_FLOAT 0 /* not allowed */ and uncomment

4.11 [WINDOWS]

To make ITK 4.11 compile, you have to apply two small patches. This is addressed in the 4.12.x release series (see http://review.source.kitware.com/#/c/22089/). To fix in 4.11, do the following:

In Modules\Core\GPUCommon\include\itkGPUImage.h, change line 179 from

virtual void Graft(const Self *data) ITK_OVERRIDE;

to

  virtual void Graft(const Self *data);

In Modules\Core\GPUCommon\include\itkGPUImageToImageFilter.h, change lines 76-77 from

  virtual void GraftOutput(typename itk::GPUTraits< TOutputImage >::Type *output) ITK_OVERRIDE;
  virtual void GraftOutput(const DataObjectIdentifierType & key, typename itk::GPUTraits< TOutputImage >::Type *output) ITK_OVERRIDE;

to

  virtual void GraftOutput(typename itk::GPUTraits< TOutputImage >::Type *output);
  virtual void GraftOutput(const DataObjectIdentifierType & key, typename itk::GPUTraits< TOutputImage >::Type *output);