Giter Site home page Giter Site logo

make error ! about killingfusion HOT 3 OPEN

peteryuan123 avatar peteryuan123 commented on August 29, 2024
make error !

from killingfusion.

Comments (3)

saurabheights avatar saurabheights commented on August 29, 2024

@daxiong-123
I dont think this should happen. However, I will need some time to get free to look into this.

from killingfusion.

HerB1998 avatar HerB1998 commented on August 29, 2024

Hi, I compile your code and it turns out that

In member function ‘Eigen::Vector3d DisplacementField::computeKillingEnergyGradient(const Vector3i&) const’:
/home/peteryuan/Desktop/KillingFusion/KillingFusion/src/DisplacementField.cpp:276:102: error: no match for ‘operator-’ (operand types are ‘const Eigen::ArrayWrapper<const Eigen::Matrix<int, 3, 1> >’ and ‘double’)
     if ((spatialIndex.array() < 2 * deltaSize).any() || (spatialIndex.array() >= (m_gridSize.array() - 2 * deltaSize)).any())

Seem like type m_gridSize.array() and double can't do minus operation.

Using Eigen 3.3.4 on ubuntu 18.04.

I also don't find overloaded operator in ArrayWrapper. How can I solve this problem, thanks.

Hello, I have met the same problem. Did you fix it?

from killingfusion.

saurabheights avatar saurabheights commented on August 29, 2024

@HerB1998 The error is coming from minus operation between an Eigen Vector(const Eigen::ArrayWrapper<const Eigen::Matrix<int, 3, 1> >) and double value: m_gridSize.array() - 2 * deltaSize).
See scalar subtraction - https://stackoverflow.com/a/35693493/1874627

I dont remember much of the codebase, but it looks almost valid. There might be a gotcha where I might have introduced a bug by trying to subtract a double from an int vector, but I believe this should be supported. If not, you might have to convert m_gridSize.array() to double before subtraction.

Apologies, but it has been years since I worked on this, can barely recall.

from killingfusion.

Related Issues (2)

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.