Giter Site home page Giter Site logo

Comments (8)

cookpa avatar cookpa commented on June 16, 2024

Corrected link to build.log: https://github.com/ANTsX/ANTs/files/13956078/build.log

from ants.

cookpa avatar cookpa commented on June 16, 2024

Error message:

In file included from /Users/xeniagrande/ANTs/Examples/antsRegistration2DDouble.cxx:1:
In file included from /Users/xeniagrande/ANTs/Examples/antsRegistrationTemplateHeader.h:14:
In file included from /Users/xeniagrande/ANTs/Examples/itkantsRegistrationHelper.h:21:
In file included from /Users/xeniagrande/ANTs/Utilities/ReadWriteData.h:26:
In file included from /Users/xeniagrande/ANTs/Tensor/itkLogTensorImageFilter.hIn file included from :/Users/xeniagrande/ANTs/Examples/antsRegistrationTemplateHeader.cxx20::
1:
/Users/xeniagrande/ANTs/Tensor/TensorFunctions.hIn file included from :/Users/xeniagrande/ANTs/Examples/antsRegistrationTemplateHeader.h441::1414:
:In file included from  /Users/xeniagrande/ANTs/Examples/itkantsRegistrationHelper.h:error: no viable conversion from 'vnl_matrix_inverse<double>' to 'MatrixType' (aka 'vnl_matrix<double>')
21:
In file included from /Users/xeniagrande/ANTs/Utilities/ReadWriteData.h:26:
In file included from /Users/xeniagrande/ANTs/Tensor/itkLogTensorImageFilter.h:20:
/Users/xeniagrande/ANTs/Tensor/TensorFunctions.h:441  MatrixType inv = vnl_matrix_inverse<double>(DT);:
14             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:
 error: no viable conversion from 'vnl_matrix_inverse<double>' to 'MatrixType' (aka 'vnl_matrix<double>')
  MatrixType inv = vnl_matrix_inverse<double>(DT);
             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:141:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'const vnl_matrix<double> &' for 1st argument
  vnl_matrix(vnl_matrix<T> const&);    // from another matrix.
  ^
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:141:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'const vnl_matrix<double> &' for 1st argument
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:148:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'vnl_matrix<double> &&' for 1st argument
  vnl_matrix(vnl_matrix<T> const&);    // from another matrix.
  ^  vnl_matrix(vnl_matrix<T> &&);

  ^
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/algo/vnl_matrix_inverse.h/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:148:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'vnl_matrix<double> &&' for 1st argument
:40:  vnl_matrix(vnl_matrix<T> &&);12
:  ^ 
note: explicit conversion function is not a candidate
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/algo/vnl_matrix_inverse.h:40:12: note: explicit conversion function is not a candidate
  explicit operator vnl_matrix<T>() const { return this->inverse(); }
           ^
  explicit operator vnl_matrix<T>() const { return this->inverse(); }
           ^
In file included from /Users/xeniagrande/ANTs/Examples/antsRegistration2DDouble.cxx:1:
In file included from /Users/xeniagrande/ANTs/Examples/antsRegistrationTemplateHeader.h:14:
In file included from /Users/xeniagrande/ANTs/Examples/itkantsRegistrationHelper.h:21:
In file included from /Users/xeniagrande/ANTs/Utilities/ReadWriteData.h:26:
In file included from /Users/xeniagrande/ANTs/Tensor/itkLogTensorImageFilter.h:20:
/Users/xeniagrande/ANTs/Tensor/TensorFunctions.h:840:14: error: no viable conversion from 'vnl_matrix_inverse<double>' to 'MatrixType' (aka 'vnl_matrix<double>')
  MatrixType inv = vnl_matrix_inverse<double>(DT);
             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:141:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'const vnl_matrix<double> &' for 1st argument
  vnl_matrix(vnl_matrix<T> const&);    // from another matrix.
  ^
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:148:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'vnl_matrix<double> &&' for 1st argument
  vnl_matrix(vnl_matrix<T> &&);
  ^
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/algo/vnl_matrix_inverse.h:40:12: note: explicit conversion function is not a candidate
  explicit operator vnl_matrix<T>() const { return this->inverse(); }
           ^
In file included from /Users/xeniagrande/ANTs/Examples/antsRegistrationTemplateHeader.cxx:1:
In file included from /Users/xeniagrande/ANTs/Examples/antsRegistrationTemplateHeader.h:14:
In file included from /Users/xeniagrande/ANTs/Examples/itkantsRegistrationHelper.h:21:
In file included from /Users/xeniagrande/ANTs/Utilities/ReadWriteData.h:26:
In file included from /Users/xeniagrande/ANTs/Tensor/itkLogTensorImageFilter.h:20:
/Users/xeniagrande/ANTs/Tensor/TensorFunctions.h:840:14: error: no viable conversion from 'vnl_matrix_inverse<double>' to 'MatrixType' (aka 'vnl_matrix<double>')
  MatrixType inv = vnl_matrix_inverse<double>(DT);
             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:141:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'const vnl_matrix<double> &' for 1st argument
  vnl_matrix(vnl_matrix<T> const&);    // from another matrix.
  ^
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/vnl_matrix.h:148:3: note: candidate constructor not viable: no known conversion from 'vnl_matrix_inverse<double>' to 'vnl_matrix<double> &&' for 1st argument
  vnl_matrix(vnl_matrix<T> &&);
  ^
/Users/xeniagrande/build/staging/include/ITK-5.4/vnl/algo/vnl_matrix_inverse.h:40:12: note: explicit conversion function is not a candidate
  explicit operator vnl_matrix<T>() const { return this->inverse(); }
           ^

from ants.

cookpa avatar cookpa commented on June 16, 2024

Reproduced on my Intel Mac. Result of recent ITK changes perhaps. I will find where the problem begins

from ants.

cookpa avatar cookpa commented on June 16, 2024

ITK bump in #1651 causes this error on Mac but not Linux

from ants.

cookpa avatar cookpa commented on June 16, 2024

Compiles fine on Mac with previous ITK (fabc102c520bcbd21ea35e7303e3756c223e10d7), from June 2023. I don't see any changes to the ITK matrix classes that would have caused this.

from ants.

cookpa avatar cookpa commented on June 16, 2024

OK so the problem looks to be conversion between matrix types in a function added a long time ago by @stnava

MatrixType inv = vnl_matrix_inverse<double>(DT);

I don't get why it stopped working now, but the compile error goes away if I explicitly get the inverse matrix with

MatrixType inv = vnl_matrix_inverse<double>(DT).inverse();

It doesn't look like the enclosing function GetMetricTensorCost is used anywhere, so I can't test it further.

from ants.

cookpa avatar cookpa commented on June 16, 2024

@x-avent could you try building #1659? It works on my Intel Mac

from ants.

x-avent avatar x-avent commented on June 16, 2024

Many thanks for the quick help! It works fine now.

from ants.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.