Want to save the image

76 views
Skip to first unread message

Grant Smith

unread,
Dec 17, 2021, 2:31:58 AM12/17/21
to cornerstone platform
I am using cornerstone with wc/wl and some annotation tools.

1. I want to take the image with its adjustments and annotations and save it as a new image.

2. I also want to take the image with its adjustments and annotations and save it in an intermediate way so that the annotations can still be moved, adjusted, and deleted if I load it in the future.

How can I get access to the flattened image for my question 1 and the layers and settings "object" for my question 2? If there is a good answer to question 2, how can I load that saved object in the future?

Thank you.

Grant Smith

unread,
Jan 11, 2022, 1:11:16 PM1/11/22
to cornerstone platform
Does anyone have any ideas on this? I have looked at the various Cornerstone APIs for getting access to the canvas but that does not work (annotations do not show on the saved/exported canvas) and also is not a good way to save things so they will continue to be editable.

Stephen Douglas Scotti

unread,
Jan 11, 2022, 2:48:24 PM1/11/22
to cornerstone platform
I don't use OHIF much anymore, but I did something with the Orthanc Stone Viewer that sounds like what you are looking for, but it requires a bit of customization.  There is a JS library called html2canvas:  https://html2canvas.hertzen.com/

Basically allows you to sort of take a screen grab of part of the DOM.  It works fairly well with what I did with the Stone Viewer.  I use that to capture a "Key Image", but the capture is static and does not allow any manipulation after the fact.

Grant Smith

unread,
Jan 11, 2022, 3:29:35 PM1/11/22
to cornerstone platform
Thank you Stephen, this is very helpful! I will continue to pursue this solution as well as an editable one (where I would probably need to accumulate the changes from each tool and save them somewhere and replay them later).
Reply all
Reply to author
Forward
0 new messages