Math and computation geometry functionality for cornerstone
cornerstonejs / cornerstonemath Goto Github PK
View Code? Open in Web Editor NEWMath and computation geometry functionality for cornerstone
License: MIT License
Math and computation geometry functionality for cornerstone
License: MIT License
I am writing tests for the functions in vector3.js, and my test for applyQuaternion fails when I when run it:
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.
Line 151 in d6b4bbb
Reference lines do not show using v0.1.9 for MRI-3T studies (axial/sagittal series).
v0.1.8 works fine.
I'm using
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.
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.