cornerstonejs / cornerstoneMath

Math and computation geometry functionality for cornerstone
MIT License
51 stars 49 forks source link

Reference lines do not show using v0.1.9 for MRI-3T #39

Open septembersoul opened 3 years ago

septembersoul commented 3 years ago

Reference lines do not show using v0.1.9 for MRI-3T studies (axial/sagittal series). v0.1.8 works fine.

I'm using

jpinxten commented 3 years ago

I'm having the same issue, reverting to v0.1.8 also fixes it for me.

https://github.com/cornerstonejs/cornerstoneTools/blob/e81f1b6c5e2fec31d5641f7f95a8f9925e92eb1e/src/util/pointProjector.js#L119-L131

This function always returns 0 intersections

swederik commented 3 years ago

Maybe broken by @ladeirarodolfo in this commit? https://github.com/cornerstonejs/cornerstoneMath/commit/825a7b5551ed1bffa75ba84e380ddc7b365e7c3d

septembersoul commented 3 years ago

In my case issue appears here https://github.com/cornerstonejs/cornerstoneMath/blob/eb61ec1eda63623c766879e1b934776237001c93/src/Line3.js#L149

I changed it to if (s >= 1.1 || isNaN(s)) and reference lines became visible. Value of s variable was about 1.0938...