Giter Site home page Giter Site logo

cornerstonemath's Introduction

NPM version NPM downloads MIT License Build Status Coverage Status

cornerstoneMath

Math and computation geometry functionality for cornerstone

cornerstonemath's People

Contributors

ayselafsar avatar babara2 avatar chafey avatar dannyrb avatar galelis avatar kevinshen1101 avatar kofifus avatar ladeirarodolfo avatar swederik avatar westim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cornerstonemath's Issues

issues with applyQuaternion in src/vector3.js

I am writing tests for the functions in vector3.js, and my test for applyQuaternion fails when I when run it:
screen shot 2018-02-12 at 11 45 30 am
screen shot 2018-02-12 at 11 45 42 am

I think there is a problem with applyQuaternion implementation since when I apply the quaternion, I am getting a larger vector than I input i.e. I am getting [2, 2, 2] whereas I input [1, 1, 1]. This is especially troubling since I am rotating the vector, [1, 1, 1] about itself, and thus am expecting to get the vector [1, 1, 1] back.
The test passes however, when I pass in the vector [1, 0, 0] to be rotated about [1, 0, 0].
I think this issue exists because the quaternion is not normalized before it is applied to the vector. Rotations should preserve lengths and angles, and we are clearly not preserving length. If this is exactly how it was meant to be implemented, I'm sorry for creating a non-issue. Otherwise, I can have a look and try and fix this.

One final point, if we are using quaternions for just rotations, when we set a quaternion with axis angle, we should normalize it then and there.

Include a LICENSE file

Hello - I'm part of a healthcare team at Google that would like to use cornerstoneMath. Our open source compliance team raised up the issue that this repo mentions MIT but doesn't explicitly include the LICENSE file (similar to your main cornerstone repo: https://github.com/cornerstonejs/cornerstone/blob/master/LICENSE). Would you mind including the MIT License as a LICENSE file? Thank you. This would also help open the door for us to contribute a few patches.

Issue during production build

In production mode modules the below is not considering as esModule

in Vector.js

setFromCoplanarPoints: function(){
}

r.default throws an error, while making it as r.default.default() then its working.
as per my understanding that webpack is not considering as esModule

ClosestPointToPointParameter in src/Line3.js

This function returns another function that takes in a point and a 'clampToLine' parameter. However, within this inner function, the line's start and end are called but the function, at this point, has lost scope of the the start and end of line, and we get the error:

undefined is not an object (evaluating 'this.start')

I am trying to write test for this function, and I suggest that instead of returning a function, why not just run the internal function directly? Once again, this might be a non-issue, but I find the issues page to be the most effective resource at resolving confusions such as this.
screen shot 2018-02-24 at 9 01 58 pm

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.