cornerstonejs / cornerstoneTools

A framework for tools built on top of Cornerstone.
https://tools.cornerstonejs.org/
MIT License
579 stars 455 forks source link

ReferenceLine can't display #1314

Open DMIAOCHEN opened 4 years ago

DMIAOCHEN commented 4 years ago

I was try with the latest version, but it's still has no referenceLine, it fine in RadiAntViewer

image

It's may something wrong in calculate referenceline when i debug the source, but i can't resolve it, there is dicom file in the end

image

refrenceLine.zip

ladeirarodolfo commented 4 years ago

Probably this might be fixed once this is solved https://github.com/cornerstonejs/cornerstoneTools/issues/1318

DMIAOCHEN commented 4 years ago

@ladeirarodolfo thanks! but it still doesnt work when i update cornerstone-math to v0.1.9, currently i solved this problem like this, but i am not sure whether it is a good solution: image

ladeirarodolfo commented 4 years ago

from math point of view you should not 'double this distance'. Javascript can cause some unwanted behaviors when doing some math calculations: My advice for you is to plot graph and see if considering the 'line' and 'rect' variables there are at least 2 intersection points. I.e before you go into implementation stuff try to see if it makes sense on real world, then try to look for rounding issues

If I have the data I can help you with some debugging

DMIAOCHEN commented 4 years ago

hi @ladeirarodolfo , this mr dicom file has upload in the top, or i can upload again, thanks for your helper!

file is here: refrenceLine.zip

DMIAOCHEN commented 4 years ago

another data also can't calaculate refrence line

referenceline.zip

tw4204 commented 4 years ago

We solved it! https://github.com/cornerstonejs/cornerstoneMath/pull/33

@dannyrb Could you please review this?

alinzll commented 3 years ago

another dicom can't display reference line, waiting for help, please! most dicom files are ok, but still few file can't display referenceline.

CT.zip

image

ssokmen commented 2 years ago

@tw4204 This solution solved my problem. Thanks for your contribution. I checked on some MR and CT images and It's also working.

sokmenserkan commented 1 year ago

Please, view this issue. https://github.com/cornerstonejs/cornerstoneMath/issues/64