cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.05k stars 598 forks source link

Is there a way to change level, window level manually? #511

Open donghakang opened 3 years ago

donghakang commented 3 years ago

Hi, I am really new to cornerstone.js, so I need your help.

I am currently using OHIF Viewer (viewer that uses cornerstone.js) and I wanted to add the UI that enables users to put the numbers in to manually adjust level, window intensity. I found that the viewport (cornerstone.getViewport(...)) has voi value, which is basically what I want, Window and Level. Is there a function that changes those values? Is there a function that is similar to setVoi? Or do I have to use different libraries such as cornerstone tools? Let me know,

Also is there any forum going on for this or Is GitHub a great place to ask questions like this? Thank you!

IbrahimCSAE commented 2 years ago

Cornerstone.setviewport()

You can pass custom numbers to this function to do what you want.