When CIP is built as a part of SlicerCIP superbuild, we get the following compile error (in OS X but similar in Windows as well):
/Users/jinho/Github/SlicerCIP-build/CIP/CommandLineTools/RegisterCT/RegisterCT.cxx:765:40: error:
no viable conversion from 'SmartPointer<class
itk::MatrixOffsetTransformBase<double, 3, 3>>' to 'SmartPointer<class
itk::Rigid3DTransform<double>>'
...RigidTransformType::Pointer rigidTransform = RigidTransformType::New();
After tracing it down, it turned out that CIP superbuild uses the following compiler flag to build ITK, while Slicer superbuild does not, which CIP in SlicerCIP uses for ITK.
-DITKV3_COMPATIBILITY:BOOL=ON (defined in External_ITKv4.cmake)
This flag is used in an ITK header file (itkv4/Modules/Core/Transform/include/itkRigid3DTransform.h) as following:
#ifdef ITKV3_COMPATIBILITY
/** Run-time type information (and related methods). */
itkNewMacro(Self);
#endif
where the New() method is not included without this flag defined.
And, CIP CommandLineTools/RegisterCT.cxx uses the New() method that requires this flag (on line 765)
There may be other ways to resolve this error but a recommendation is to remove the dependency on the ITKV3_COMPATIBILITY in the CIP code (if feasible).
When CIP is built as a part of SlicerCIP superbuild, we get the following compile error (in OS X but similar in Windows as well):
After tracing it down, it turned out that CIP superbuild uses the following compiler flag to build ITK, while Slicer superbuild does not, which CIP in SlicerCIP uses for ITK.
This flag is used in an ITK header file (itkv4/Modules/Core/Transform/include/itkRigid3DTransform.h) as following:
where the New() method is not included without this flag defined.
And, CIP CommandLineTools/RegisterCT.cxx uses the New() method that requires this flag (on line 765)
There may be other ways to resolve this error but a recommendation is to remove the dependency on the ITKV3_COMPATIBILITY in the CIP code (if feasible).