Add Measurements Manually with out any event in React based OHIF Viewer
I want to add rectangleROI without any event(mouse/touch) please help me with the demo code.
I have seen that this depends on the mouse events which creates the measurement. But I have all the necessary information to draw the rectangle already. And I want to add the measurement manually.
I am a beginner in node/React.
Thanks a lot in advance.
Today, toolstate primarily lives in cornerstone-tools. In the future, I'm hoping we surface a library agnostic MeasurementService or manager. The easiest way is to hook into the get/setToolState methods for cornerstone-tools.
https://github.com/cornerstonejs/cornerstoneTools/blob/master/src/index.js#L144-L145
There may be a convenience method on our MeasurementAPI that adds it to our measurement table, but also syncs with cornerstone-tools, but I'm not familiar.
This is something we should look into, but I'm open to suggestions on how you would expect this to be implemented.
Thanks @dannyrb
Your Guidance is very helpful.
@dannyrb you got it working?