ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

Conda distribution via conda-forge

Open oesteban opened this issue 5 years ago • 40 comments

Providing a conda installation would maximize the exposure of this tool, and will resolve some problems for windows users, as all the software is pre-compiled when the conda-forge recipe is updated. Given the complexity of the installation (ITK, VTK, ANTs), I think splitting the package into two: antspy and ants (which would be a distribution of ITK, VTK and ANTS binaries) would make a lot of sense.

Happy to take a look in my spare cycles within the next two months, if there's any interest in this.

oesteban avatar Sep 25 '20 14:09 oesteban

we are interested in this. did something similar for ANTsR. the VTK wrapping is currently incomplete although it would not be difficult to finish it. thx!

stnava avatar Sep 25 '20 15:09 stnava

two months has passed. any comment on this? otherwise will close issue soon and perhaps open new issue related to conda distribution.

stnava avatar Feb 17 '21 19:02 stnava

I'll try to have a look within one week and if I can't do anything reasonable within that window, close the issue. WDYT?

oesteban avatar Feb 17 '21 21:02 oesteban

Great - that works On Wed, Feb 17, 2021 at 4:18 PM Oscar Esteban [email protected] wrote:

I'll try to have a look within one week and if I can't do anything reasonable within that window, close the issue. WDYT?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsPy/issues/213#issuecomment-780860245, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPE7XPFMFNJ7UFSWRFXCLS7QXA5ANCNFSM4RZUHMYQ .

--

brian

stnava avatar Feb 17 '21 21:02 stnava

Sorry I could not allocate time for this. If I happen to find some, I'll let you all know here before I start (to avoid duplicate efforts).

oesteban avatar Feb 26 '21 09:02 oesteban

Thanks @oesteban

ntustison avatar Feb 26 '21 14:02 ntustison

I'd be keen to give it a go as part of my work on Clinica which uses ANTS for specific pipelines and would benefit from a conda-forge package.

Is that ok with you folks? Shall I open a new issue or can this one be reopened?

ghisvail avatar May 21 '21 12:05 ghisvail

we appreciate any help - thx.

stnava avatar May 21 '21 12:05 stnava

See https://github.com/conda-forge/staged-recipes/pull/15000 for ANTs

ghisvail avatar May 21 '21 16:05 ghisvail

@stavna shall I add yourself (and maybe others) to the maintainer field of the conda-forge recipe?

ghisvail avatar May 21 '21 16:05 ghisvail

Can you explain a little about what your recipe does?

On Fri, May 21, 2021 at 12:17 PM Ghislain Antony Vaillant < @.***> wrote:

@stavna https://github.com/stavna shall I add yourself (and maybe others) to the maintainer field of the conda-forge recipe?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsPy/issues/213#issuecomment-846075779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPE7VJJQJG2EF3KK6OANTTO2BSRANCNFSM4RZUHMYQ .

--

brian

stnava avatar May 21 '21 16:05 stnava

Can you explain a little about what your recipe does?

Basically build ANTs using the conda-forge infrastructure and existing packages.

ghisvail avatar May 22 '21 13:05 ghisvail

Still a work in progress at this point and not ready for review by the conda-forge maintainers yet.

ghisvail avatar May 22 '21 13:05 ghisvail

I am getting the following build issue. Could someone help finding the problem?

Extract from the log:

2021-05-22T17:10:12.6479451Z [21/511] Building CXX object Examples/CMakeFiles/l_ANTS.dir/ANTS.cxx.o
2021-05-22T17:10:12.6480370Z FAILED: Examples/CMakeFiles/l_ANTS.dir/ANTS.cxx.o 
2021-05-22T17:10:12.6483499Z $BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ -DITK_IO_FACTORY_REGISTER_MANAGER -Dl_ANTS_EXPORTS -I. -I../Examples -I../Temporary -I../Tensor -I../ImageSegmentation -I../ImageRegistration -I../Utilities -IITKFactoryRegistration -isystem $PREFIX/include/ITK-5.2 -isystem $PREFIX/include/eigen3 -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/ants-2.3.5 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix  -mtune=native -march=corei7 -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual -Wstrict-null-sentinel  -O3 -DNDEBUG -fPIC -std=c++11 -MD -MT Examples/CMakeFiles/l_ANTS.dir/ANTS.cxx.o -MF Examples/CMakeFiles/l_ANTS.dir/ANTS.cxx.o.d -o Examples/CMakeFiles/l_ANTS.dir/ANTS.cxx.o -c ../Examples/ANTS.cxx
2021-05-22T17:10:12.6485536Z In file included from ../ImageRegistration/itkANTSImageRegistrationOptimizer.h:2171,
2021-05-22T17:10:12.6486090Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:21,
2021-05-22T17:10:12.6494722Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6500859Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.cxx: In instantiation of 'itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegrateVelocity(TReal, TReal) [with unsigned int TDimension = 3; TReal = float; itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer = itk::SmartPointer<itk::Image<itk::Vector<float, 3>, 3> >]':
2021-05-22T17:10:12.6506988Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.h:1611:43:   required from 'void itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DeformableOptimization() [with unsigned int TDimension = 3; TReal = float]'
2021-05-22T17:10:12.6512479Z ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.hxx:306:3:   required from 'void itk::PICSLAdvancedNormalizationToolKit<TDimension, TReal>::RunRegistration() [with unsigned int TDimension = 3; TReal = float]'
2021-05-22T17:10:12.6547382Z ../Examples/ANTS.cxx:90:5:   required from 'int ants::ANTSex(int, char**) [with unsigned int ImageDimension = 3]'
2021-05-22T17:10:12.6548088Z ../Examples/ANTS.cxx:336:44:   required from here
2021-05-22T17:10:12.6549252Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.cxx:2476:33: error: invalid initialization of reference of type 'itk::Image<float, 3>&&' from expression of type 'itk::ANTSImageRegistrationOptimizer<3, float>::ImagePointer' {aka 'itk::SmartPointer<itk::Image<float, 3> >'}
2021-05-22T17:10:12.6550324Z  2476 |     WriteImage<ImageType>(this->m_ThickImage, outname.c_str() );
2021-05-22T17:10:12.6550809Z       |                           ~~~~~~^~~~~~~~~~~~
2021-05-22T17:10:12.6551405Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6551834Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6552312Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6552787Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6553258Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6553715Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6554718Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:247:29: note: in passing argument 1 of 'void itk::WriteImage(TImagePointer&&, const string&, bool) [with TImagePointer = itk::Image<float, 3>; std::string = std::__cxx11::basic_string<char>]'
2021-05-22T17:10:12.6555591Z   247 | WriteImage(TImagePointer && image, const std::string & filename, bool compress = false)
2021-05-22T17:10:12.6556067Z       |            ~~~~~~~~~~~~~~~~~^~~~~
2021-05-22T17:10:12.6556488Z In file included from ../ImageRegistration/itkANTSImageRegistrationOptimizer.h:2171,
2021-05-22T17:10:12.6556984Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:21,
2021-05-22T17:10:12.6557415Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6558941Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.cxx: In instantiation of 'itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegrateVelocity(TReal, TReal) [with unsigned int TDimension = 2; TReal = float; itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer = itk::SmartPointer<itk::Image<itk::Vector<float, 2>, 2> >]':
2021-05-22T17:10:12.6560632Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.h:1611:43:   required from 'void itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DeformableOptimization() [with unsigned int TDimension = 2; TReal = float]'
2021-05-22T17:10:12.6561898Z ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.hxx:306:3:   required from 'void itk::PICSLAdvancedNormalizationToolKit<TDimension, TReal>::RunRegistration() [with unsigned int TDimension = 2; TReal = float]'
2021-05-22T17:10:12.6562935Z ../Examples/ANTS.cxx:90:5:   required from 'int ants::ANTSex(int, char**) [with unsigned int ImageDimension = 2]'
2021-05-22T17:10:12.6563502Z ../Examples/ANTS.cxx:340:44:   required from here
2021-05-22T17:10:12.6564600Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.cxx:2476:33: error: invalid initialization of reference of type 'itk::Image<float, 2>&&' from expression of type 'itk::ANTSImageRegistrationOptimizer<2, float>::ImagePointer' {aka 'itk::SmartPointer<itk::Image<float, 2> >'}
2021-05-22T17:10:12.6565641Z  2476 |     WriteImage<ImageType>(this->m_ThickImage, outname.c_str() );
2021-05-22T17:10:12.6566136Z       |                           ~~~~~~^~~~~~~~~~~~
2021-05-22T17:10:12.6566555Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6566978Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6567449Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6567940Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6568432Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6568878Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6569858Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:247:29: note: in passing argument 1 of 'void itk::WriteImage(TImagePointer&&, const string&, bool) [with TImagePointer = itk::Image<float, 2>; std::string = std::__cxx11::basic_string<char>]'
2021-05-22T17:10:12.6570694Z   247 | WriteImage(TImagePointer && image, const std::string & filename, bool compress = false)
2021-05-22T17:10:12.6571154Z       |            ~~~~~~~~~~~~~~~~~^~~~~
2021-05-22T17:10:12.6572207Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h: In instantiation of 'void itk::WriteImage(TImagePointer&&, const string&, bool) [with TImagePointer = itk::Image<float, 3>; std::string = std::__cxx11::basic_string<char>]':
2021-05-22T17:10:12.6573986Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.cxx:2476:26:   required from 'itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegrateVelocity(TReal, TReal) [with unsigned int TDimension = 3; TReal = float; itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer = itk::SmartPointer<itk::Image<itk::Vector<float, 3>, 3> >]'
2021-05-22T17:10:12.6582217Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.h:1611:43:   required from 'void itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DeformableOptimization() [with unsigned int TDimension = 3; TReal = float]'
2021-05-22T17:10:12.6583720Z ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.hxx:306:3:   required from 'void itk::PICSLAdvancedNormalizationToolKit<TDimension, TReal>::RunRegistration() [with unsigned int TDimension = 3; TReal = float]'
2021-05-22T17:10:12.6584827Z ../Examples/ANTS.cxx:90:5:   required from 'int ants::ANTSex(int, char**) [with unsigned int ImageDimension = 3]'
2021-05-22T17:10:12.6585422Z ../Examples/ANTS.cxx:336:44:   required from here
2021-05-22T17:10:12.6586188Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:250:66: error: static assertion failed: WriteImage requires a raw pointer or SmartPointer.
2021-05-22T17:10:12.6586935Z   250 |   static_assert(std::is_pointer<NonReferenceImagePointer>::value ||
2021-05-22T17:10:12.6587471Z       |                                                            ~~~~~~^~
2021-05-22T17:10:12.6587944Z   251 |                   mpl::IsSmartPointer<NonReferenceImagePointer>::Value,
2021-05-22T17:10:12.6588465Z       |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-05-22T17:10:12.6589256Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: error: no match for 'operator*' (operand type is 'itk::Image<float, 3>')
2021-05-22T17:10:12.6589966Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6590547Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6591194Z In file included from $PREFIX/include/ITK-5.2/itkPoint.h:23,
2021-05-22T17:10:12.6591893Z                  from $PREFIX/include/ITK-5.2/itkContinuousIndex.h:21,
2021-05-22T17:10:12.6592582Z                  from $PREFIX/include/ITK-5.2/itkImageRegion.h:34,
2021-05-22T17:10:12.6593278Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:33,
2021-05-22T17:10:12.6593776Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6594180Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6594591Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6595497Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::Vector<T, NVectorDimension> itk::operator*(const T&, const itk::Vector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6596295Z   297 | inline Vector<T, NVectorDimension> operator*(const T & scalar, const Vector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6596774Z       |                                    ^~~~~~~~
2021-05-22T17:10:12.6597444Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6598000Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6598450Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6598911Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6599385Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6599981Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6600461Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6601269Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6601919Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6602507Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6603161Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6603850Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6604346Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6604750Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6605148Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6606107Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::CovariantVector<T, NVectorDimension> itk::operator*(const T&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6606954Z   268 | inline CovariantVector<T, NVectorDimension> operator*(const T & scalar, const CovariantVector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6607458Z       |                                             ^~~~~~~~
2021-05-22T17:10:12.6608246Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6608837Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6609268Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6609747Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6610224Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6610701Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6611149Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6611817Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6612500Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6613089Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6613746Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6614434Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6614905Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6615327Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6616964Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6618020Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note: candidate: 'template<class T, unsigned int NVectorDimension> T itk::operator*(const itk::Vector<T, NVectorDimension>&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6618820Z   276 | inline T operator*(const Vector<T, NVectorDimension> &          contravariant,
2021-05-22T17:10:12.6619237Z       |          ^~~~~~~~
2021-05-22T17:10:12.6619901Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6620468Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6620902Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6621379Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6621834Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6622464Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6622920Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6623701Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   'itk::Image<float, 3>' is not derived from 'const itk::Vector<T, NVectorDimension>'
2021-05-22T17:10:12.6624439Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6625062Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6625727Z In file included from $PREFIX/include/ITK-5.2/itkTransform.h:25,
2021-05-22T17:10:12.6626449Z                  from $PREFIX/include/ITK-5.2/itkMatrixOffsetTransformBase.h:24,
2021-05-22T17:10:12.6627173Z                  from $PREFIX/include/ITK-5.2/itkRigid3DTransform.h:22,
2021-05-22T17:10:12.6627892Z                  from $PREFIX/include/ITK-5.2/itkEuler3DTransform.h:22,
2021-05-22T17:10:12.6628627Z                  from $PREFIX/include/ITK-5.2/itkCenteredEuler3DTransform.h:22,
2021-05-22T17:10:12.6629153Z                  from ../ImageRegistration/itkANTSImageTransformation.h:24,
2021-05-22T17:10:12.6629649Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6630788Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6632820Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note: candidate: 'template<class TExpr1, class TExpr2> typename itk::mpl::EnableIf<itk::Details::op::CanBeMultiplied<TExpr1, TExpr2>, itk::VariableLengthVectorExpression<TExpr1, TExpr2, itk::Details::op::Mult> >::Type itk::operator*(const TExpr1&, const TExpr2&)'
2021-05-22T17:10:12.6634496Z  1301 | operator*(TExpr1 const & lhs, TExpr2 const & rhs)
2021-05-22T17:10:12.6635057Z       | ^~~~~~~~
2021-05-22T17:10:12.6635744Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6636333Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6636759Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6637232Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6637708Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6638176Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6638619Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6639294Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6639978Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6640558Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6641358Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: error: no match for 'operator*' (operand type is 'itk::Image<float, 3>')
2021-05-22T17:10:12.6642149Z In file included from $PREFIX/include/ITK-5.2/itkPoint.h:23,
2021-05-22T17:10:12.6642825Z                  from $PREFIX/include/ITK-5.2/itkContinuousIndex.h:21,
2021-05-22T17:10:12.6643527Z                  from $PREFIX/include/ITK-5.2/itkImageRegion.h:34,
2021-05-22T17:10:12.6644213Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:33,
2021-05-22T17:10:12.6644690Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6645112Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6645499Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6646420Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::Vector<T, NVectorDimension> itk::operator*(const T&, const itk::Vector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6647309Z   297 | inline Vector<T, NVectorDimension> operator*(const T & scalar, const Vector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6647773Z       |                                    ^~~~~~~~
2021-05-22T17:10:12.6648482Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6649017Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6649466Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6649942Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6650401Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6650887Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6651317Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6652036Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6652699Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6653265Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6653928Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6654585Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6655081Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6655841Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6656377Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6657418Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::CovariantVector<T, NVectorDimension> itk::operator*(const T&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6658276Z   268 | inline CovariantVector<T, NVectorDimension> operator*(const T & scalar, const CovariantVector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6658768Z       |                                             ^~~~~~~~
2021-05-22T17:10:12.6659493Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6660037Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6660482Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6660956Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6661417Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6661905Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6662331Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6663016Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6663670Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6664262Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6664932Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6665595Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6666090Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6666491Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6666899Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6667853Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note: candidate: 'template<class T, unsigned int NVectorDimension> T itk::operator*(const itk::Vector<T, NVectorDimension>&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6668725Z   276 | inline T operator*(const Vector<T, NVectorDimension> &          contravariant,
2021-05-22T17:10:12.6669148Z       |          ^~~~~~~~
2021-05-22T17:10:12.6669838Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6670384Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6670829Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6671289Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6671772Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6672261Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6672693Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6673478Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   'itk::Image<float, 3>' is not derived from 'const itk::Vector<T, NVectorDimension>'
2021-05-22T17:10:12.6674195Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6674775Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6675477Z In file included from $PREFIX/include/ITK-5.2/itkTransform.h:25,
2021-05-22T17:10:12.6676183Z                  from $PREFIX/include/ITK-5.2/itkMatrixOffsetTransformBase.h:24,
2021-05-22T17:10:12.6676996Z                  from $PREFIX/include/ITK-5.2/itkRigid3DTransform.h:22,
2021-05-22T17:10:12.6677728Z                  from $PREFIX/include/ITK-5.2/itkEuler3DTransform.h:22,
2021-05-22T17:10:12.6678469Z                  from $PREFIX/include/ITK-5.2/itkCenteredEuler3DTransform.h:22,
2021-05-22T17:10:12.6679008Z                  from ../ImageRegistration/itkANTSImageTransformation.h:24,
2021-05-22T17:10:12.6679488Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6679941Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6681085Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note: candidate: 'template<class TExpr1, class TExpr2> typename itk::mpl::EnableIf<itk::Details::op::CanBeMultiplied<TExpr1, TExpr2>, itk::VariableLengthVectorExpression<TExpr1, TExpr2, itk::Details::op::Mult> >::Type itk::operator*(const TExpr1&, const TExpr2&)'
2021-05-22T17:10:12.6681990Z  1301 | operator*(TExpr1 const & lhs, TExpr2 const & rhs)
2021-05-22T17:10:12.6682358Z       | ^~~~~~~~
2021-05-22T17:10:12.6683023Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6683599Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6684046Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6684505Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6684986Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6685458Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6685905Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6686572Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6687223Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6687833Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6688838Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h: In instantiation of 'void itk::WriteImage(TImagePointer&&, const string&, bool) [with TImagePointer = itk::Image<float, 2>; std::string = std::__cxx11::basic_string<char>]':
2021-05-22T17:10:12.6690719Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.cxx:2476:26:   required from 'itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegrateVelocity(TReal, TReal) [with unsigned int TDimension = 2; TReal = float; itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DisplacementFieldPointer = itk::SmartPointer<itk::Image<itk::Vector<float, 2>, 2> >]'
2021-05-22T17:10:12.6692380Z ../ImageRegistration/itkANTSImageRegistrationOptimizer.h:1611:43:   required from 'void itk::ANTSImageRegistrationOptimizer<TDimension, TReal>::DeformableOptimization() [with unsigned int TDimension = 2; TReal = float]'
2021-05-22T17:10:12.6693642Z ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.hxx:306:3:   required from 'void itk::PICSLAdvancedNormalizationToolKit<TDimension, TReal>::RunRegistration() [with unsigned int TDimension = 2; TReal = float]'
2021-05-22T17:10:12.6694675Z ../Examples/ANTS.cxx:90:5:   required from 'int ants::ANTSex(int, char**) [with unsigned int ImageDimension = 2]'
2021-05-22T17:10:12.6695252Z ../Examples/ANTS.cxx:340:44:   required from here
2021-05-22T17:10:12.6696179Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:250:66: error: static assertion failed: WriteImage requires a raw pointer or SmartPointer.
2021-05-22T17:10:12.6696848Z   250 |   static_assert(std::is_pointer<NonReferenceImagePointer>::value ||
2021-05-22T17:10:12.6697339Z       |                                                            ~~~~~~^~
2021-05-22T17:10:12.6697805Z   251 |                   mpl::IsSmartPointer<NonReferenceImagePointer>::Value,
2021-05-22T17:10:12.6698369Z       |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-05-22T17:10:12.6699260Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: error: no match for 'operator*' (operand type is 'itk::Image<float, 2>')
2021-05-22T17:10:12.6699966Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6700564Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6701268Z In file included from $PREFIX/include/ITK-5.2/itkPoint.h:23,
2021-05-22T17:10:12.6701954Z                  from $PREFIX/include/ITK-5.2/itkContinuousIndex.h:21,
2021-05-22T17:10:12.6702661Z                  from $PREFIX/include/ITK-5.2/itkImageRegion.h:34,
2021-05-22T17:10:12.6703333Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:33,
2021-05-22T17:10:12.6703825Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6704231Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6704637Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6705558Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::Vector<T, NVectorDimension> itk::operator*(const T&, const itk::Vector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6706332Z   297 | inline Vector<T, NVectorDimension> operator*(const T & scalar, const Vector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6706808Z       |                                    ^~~~~~~~
2021-05-22T17:10:12.6707495Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6708026Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6708472Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6708933Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6709414Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6709904Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6710332Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6711017Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6711756Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6712346Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6713026Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6713721Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6714217Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6714623Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6715028Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6716003Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::CovariantVector<T, NVectorDimension> itk::operator*(const T&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6716833Z   268 | inline CovariantVector<T, NVectorDimension> operator*(const T & scalar, const CovariantVector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6717342Z       |                                             ^~~~~~~~
2021-05-22T17:10:12.6718061Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6718604Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6719047Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6719690Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6720209Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6720703Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6721133Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6721839Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6722479Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6723061Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6723728Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6724394Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6724914Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6725325Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6725732Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6726687Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note: candidate: 'template<class T, unsigned int NVectorDimension> T itk::operator*(const itk::Vector<T, NVectorDimension>&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6727448Z   276 | inline T operator*(const Vector<T, NVectorDimension> &          contravariant,
2021-05-22T17:10:12.6727865Z       |          ^~~~~~~~
2021-05-22T17:10:12.6728523Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6729089Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6729533Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6729988Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6730465Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6731559Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6732841Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6734014Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   'itk::Image<float, 2>' is not derived from 'const itk::Vector<T, NVectorDimension>'
2021-05-22T17:10:12.6735177Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6776452Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6777321Z In file included from $PREFIX/include/ITK-5.2/itkTransform.h:25,
2021-05-22T17:10:12.6778099Z                  from $PREFIX/include/ITK-5.2/itkMatrixOffsetTransformBase.h:24,
2021-05-22T17:10:12.6778848Z                  from $PREFIX/include/ITK-5.2/itkRigid3DTransform.h:22,
2021-05-22T17:10:12.6779553Z                  from $PREFIX/include/ITK-5.2/itkEuler3DTransform.h:22,
2021-05-22T17:10:12.6780323Z                  from $PREFIX/include/ITK-5.2/itkCenteredEuler3DTransform.h:22,
2021-05-22T17:10:12.6780853Z                  from ../ImageRegistration/itkANTSImageTransformation.h:24,
2021-05-22T17:10:12.6781352Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6781812Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6782959Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note: candidate: 'template<class TExpr1, class TExpr2> typename itk::mpl::EnableIf<itk::Details::op::CanBeMultiplied<TExpr1, TExpr2>, itk::VariableLengthVectorExpression<TExpr1, TExpr2, itk::Details::op::Mult> >::Type itk::operator*(const TExpr1&, const TExpr2&)'
2021-05-22T17:10:12.6783882Z  1301 | operator*(TExpr1 const & lhs, TExpr2 const & rhs)
2021-05-22T17:10:12.6784267Z       | ^~~~~~~~
2021-05-22T17:10:12.6785068Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6785687Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6786140Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6786593Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6787076Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6787547Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6787999Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6788703Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6789343Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6789929Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6790723Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: error: no match for 'operator*' (operand type is 'itk::Image<float, 2>')
2021-05-22T17:10:12.6791504Z In file included from $PREFIX/include/ITK-5.2/itkPoint.h:23,
2021-05-22T17:10:12.6792198Z                  from $PREFIX/include/ITK-5.2/itkContinuousIndex.h:21,
2021-05-22T17:10:12.6792907Z                  from $PREFIX/include/ITK-5.2/itkImageRegion.h:34,
2021-05-22T17:10:12.6793599Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:33,
2021-05-22T17:10:12.6794064Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6794484Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6794891Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6795798Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::Vector<T, NVectorDimension> itk::operator*(const T&, const itk::Vector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6796582Z   297 | inline Vector<T, NVectorDimension> operator*(const T & scalar, const Vector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6797141Z       |                                    ^~~~~~~~
2021-05-22T17:10:12.6797829Z $PREFIX/include/ITK-5.2/itkVector.h:297:36: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6798509Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6798941Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6799418Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6799873Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6800365Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6800816Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6801504Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6802163Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6802741Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6803396Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6804079Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6804576Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6805002Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6805387Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6806445Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note: candidate: 'template<class T, unsigned int NVectorDimension> itk::CovariantVector<T, NVectorDimension> itk::operator*(const T&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6807317Z   268 | inline CovariantVector<T, NVectorDimension> operator*(const T & scalar, const CovariantVector<T, NVectorDimension> & v)
2021-05-22T17:10:12.6807812Z       |                                             ^~~~~~~~
2021-05-22T17:10:12.6808585Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:268:45: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6809162Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6809591Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6810065Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6810537Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6811009Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6811460Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6812129Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6812785Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6813364Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6814017Z In file included from $PREFIX/include/ITK-5.2/itkMatrix.h:22,
2021-05-22T17:10:12.6814694Z                  from $PREFIX/include/ITK-5.2/itkImageBase.h:34,
2021-05-22T17:10:12.6815160Z                  from ../Utilities/antsAllocImage.h:3,
2021-05-22T17:10:12.6815705Z                  from ../Examples/antsUtilities.h:12,
2021-05-22T17:10:12.6816301Z                  from ../Examples/ANTS.cxx:15:
2021-05-22T17:10:12.6817294Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note: candidate: 'template<class T, unsigned int NVectorDimension> T itk::operator*(const itk::Vector<T, NVectorDimension>&, const itk::CovariantVector<T, NVectorDimension>&)'
2021-05-22T17:10:12.6818070Z   276 | inline T operator*(const Vector<T, NVectorDimension> &          contravariant,
2021-05-22T17:10:12.6818468Z       |          ^~~~~~~~
2021-05-22T17:10:12.6819144Z $PREFIX/include/ITK-5.2/itkCovariantVector.h:276:10: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6819837Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6820268Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6820744Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6821203Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6821693Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6822138Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6822923Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   'itk::Image<float, 2>' is not derived from 'const itk::Vector<T, NVectorDimension>'
2021-05-22T17:10:12.6823651Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6824214Z       |                                                                                        ^~~~~~
2021-05-22T17:10:12.6824897Z In file included from $PREFIX/include/ITK-5.2/itkTransform.h:25,
2021-05-22T17:10:12.6825613Z                  from $PREFIX/include/ITK-5.2/itkMatrixOffsetTransformBase.h:24,
2021-05-22T17:10:12.6826316Z                  from $PREFIX/include/ITK-5.2/itkRigid3DTransform.h:22,
2021-05-22T17:10:12.6827029Z                  from $PREFIX/include/ITK-5.2/itkEuler3DTransform.h:22,
2021-05-22T17:10:12.6827732Z                  from $PREFIX/include/ITK-5.2/itkCenteredEuler3DTransform.h:22,
2021-05-22T17:10:12.6828367Z                  from ../ImageRegistration/itkANTSImageTransformation.h:24,
2021-05-22T17:10:12.6828924Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6829358Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6830533Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note: candidate: 'template<class TExpr1, class TExpr2> typename itk::mpl::EnableIf<itk::Details::op::CanBeMultiplied<TExpr1, TExpr2>, itk::VariableLengthVectorExpression<TExpr1, TExpr2, itk::Details::op::Mult> >::Type itk::operator*(const TExpr1&, const TExpr2&)'
2021-05-22T17:10:12.6831443Z  1301 | operator*(TExpr1 const & lhs, TExpr2 const & rhs)
2021-05-22T17:10:12.6831795Z       | ^~~~~~~~
2021-05-22T17:10:12.6833409Z $PREFIX/include/ITK-5.2/itkVariableLengthVector.h:1301:1: note:   template argument deduction/substitution failed:
2021-05-22T17:10:12.6834299Z In file included from ../Utilities/ReadWriteData.h:10,
2021-05-22T17:10:12.6834939Z                  from ../ImageRegistration/ANTS_affine_registration2.h:32,
2021-05-22T17:10:12.6835582Z                  from ../ImageRegistration/itkANTSImageTransformation.cxx:22,
2021-05-22T17:10:12.6836449Z                  from ../ImageRegistration/itkANTSImageTransformation.h:190,
2021-05-22T17:10:12.6836935Z                  from ../ImageRegistration/itkPICSLAdvancedNormalizationToolKit.h:20,
2021-05-22T17:10:12.6837365Z                  from ../Examples/ANTS.cxx:18:
2021-05-22T17:10:12.6838074Z $PREFIX/include/ITK-5.2/itkImageFileWriter.h:254:88: note:   candidate expects 2 arguments, 1 provided
2021-05-22T17:10:12.6838735Z   254 |   using ImageType = typename std::remove_const<typename std::remove_reference<decltype(*image)>::type>::type;
2021-05-22T17:10:12.6839297Z       |                                                                                        ^~~~~~
2021-05-22T17:10:27.1808502Z [22/511] Building CXX object Examples/CMakeFiles/l_antsLandmarkBasedTransformInitializer.dir/antsLandmarkBasedTransformInitializer.cxx.o
2021-05-22T17:10:33.2990196Z [23/511] Building CXX object Examples/CMakeFiles/l_ANTSIntegrateVelocityField.dir/ANTSIntegrateVelocityField.cxx.o
2021-05-22T17:10:33.2993310Z ninja: build stopped: subcommand failed.

ghisvail avatar May 22 '21 17:05 ghisvail

Thank you for putting this together, @ghisvail (I especially like the part that Windows builds are working as expected)! I might have some ideas on how to fix this. Do you want me to comment here or on the conda recipe thread?

sarthakpati avatar Jun 29 '21 15:06 sarthakpati

@sarthakpati here please 🙏

ghisvail avatar Jun 29 '21 15:06 ghisvail

So, the error seems to tell me that there might be C++11 flag missing. In my CMake projects, I usually pass the following configuration flags:

-DCMAKE_CXX_STANDARD:STRING=11 \
-DCMAKE_CXX_STANDARD_REQUIRED:BOOL=YES

This doesn't come up on MSVC because it automatically adds these flags to ensure maximum compatibility.

sarthakpati avatar Jun 29 '21 17:06 sarthakpati

Still a bunch of template deduction errors despite the proposed changes. Logs available here.

ghisvail avatar Jun 29 '21 19:06 ghisvail

Could these lines help [ref]?

        env["CXXFLAGS"] = '{} {} -DVERSION_INFO=\\"{}\\"'.format(
            "-Wno-inconsistent-missing-override",
            env.get("CXXFLAGS", ""),
            self.distribution.get_version(),
        )
        env["LINKFLAGS"] = "{}".format("-Wno-inconsistent-missing-override")

sarthakpati avatar Jun 29 '21 20:06 sarthakpati

I am not quite sure what you are proposing.

ghisvail avatar Jun 29 '21 20:06 ghisvail

Basically, in your build script, you can add -Wno-inconsistent-missing-override into these environment variables:

  • CXXFLAGS
  • LINKFLAGS

Because this is how ANTs is getting built, apparently...

sarthakpati avatar Jun 29 '21 20:06 sarthakpati

I don't understand how this is supposed to help. -Wno-inconsistent-missing-override is a compiler warning flag, not something that should fix template issues.

ghisvail avatar Jun 30 '21 08:06 ghisvail

I agree. I am just trying to replicate the build process of ants...

Speaking of, it possible to have a minimum CMake version? https://github.com/ANTsX/ANTsPy/blob/master/setup.py#L103

sarthakpati avatar Jun 30 '21 09:06 sarthakpati

CMake is recent enough on conda-forge

ghisvail avatar Jun 30 '21 10:06 ghisvail

Yup, I just saw. The other explanation is that it might be coming from ITK, which is possibly built without C++11 support on conda? I see that ITK build for ANTs requires a very specific recipe [ref] with CXX_FLAGS=CXX11 enabled [ref], perhaps we could try to build ITK for ANTs?

sarthakpati avatar Jun 30 '21 10:06 sarthakpati

see that ITK build for ANTs requires a very specific recipe

Indeed, and I have already raised my concerns here.

perhaps we could try to build ITK for ANTs?

The goal is to reuse as much of what conda-forge already provides, and not maintain yet another private copy of ITK. The ITK package of conda-forge is maintained by the ITK maintainers so we are not likely to top that.

ghisvail avatar Jun 30 '21 10:06 ghisvail

I especially like the part that Windows builds are working as expected

FYI, there are no builds for Windows yet. The Azure reporting for Windows builds is a red herring.

ghisvail avatar Jun 30 '21 10:06 ghisvail

The goal is to reuse as much of what conda-forge already provides, and not maintain yet another private copy of ITK

Completely agree. How about specifying the version in the recipe by adding the following lines:

requirements:
  build:
    - {{ compiler('cxx') }}
    - cmake >=3.10.2
    - ninja
  host:
    - boost-cpp
    - libitk-devel  >= 5.2.0
  run:
    - libitk  >= 5.2.0

FYI, there are no builds for Windows yet. The Azure reporting for Windows builds is a red herring.

Aw shucks.

sarthakpati avatar Jun 30 '21 12:06 sarthakpati

We could, we are still far from resolving the actual build issue though.

ghisvail avatar Jun 30 '21 13:06 ghisvail

We could, we are still far from resolving the actual build issue though.

Yeah, I am hoping that putting the ITK version requirement will solve it, though I think we might need to build ITK from scratch for ANTs...

sarthakpati avatar Jun 30 '21 15:06 sarthakpati