cornerstonejs / react-cornerstone-viewport

Cornerstone medical image viewport component for React
https://react.cornerstonejs.org/
MIT License
96 stars 74 forks source link

annotations can be saved ? #76

Closed marcosguti closed 4 years ago

marcosguti commented 4 years ago

i want to add annotations and save in some way that allow this annotations when viewer is reloaded, is this posible? maybe local storage

dannyrb commented 4 years ago

The cornerstone-tools has an "ID Specific State Manager" that supports save/restore of current tool state. As tool state is just a plain javascript object, and serializable as JSON, it should be easy to capture, persist using your preferred mechanism, and restored.

getnsv commented 4 years ago

@marcosguti - Were you able to achieve saving of the annotations and rendering back to the canvas... please can you share the code example if possible. It will be helpful as I am also working on a similar project.