ivmartel / dwv-jqui

Medical image viewer based on DWV (DICOM Web Viewer) and jQuery UI.
https://ivmartel.github.io/dwv-jqui/
GNU General Public License v3.0
18 stars 18 forks source link

State json exported explained #63

Closed gdet closed 2 years ago

gdet commented 2 years ago

Hello, I have added 3 annotations (arrows) in an dicom image and I export the state but there are a lot of x,y values for each annotation. Which ones are the coordinates? I am little confused. Is there a wiki about the json format you are exporting?

Thank you very much

ivmartel commented 2 years ago

The format used to save the shapes is the one used by Konva, see its demos: Simple_Load. In dwv, the shape has the name set to shape, find this object and check its points, they will define the shape.

ivmartel commented 2 years ago

I hope I answered your question. Closing for now, feel free to comment if you need.

gdet commented 2 years ago

Hello! Sorry for the late answer. I am not using shapes only arrows like that εικόνα

I think I found which one are the correct x,y but if you have any example like the one you send it would be great. Also if I am not mistaken, if I move the arrow the x,y coordinates are not updated. Am I right?

ivmartel commented 2 years ago

You can check the test state files in dwv/tree/v0.30.8/tests/state/v0.5. You are right, moving the arrow shifts the Konva group that contains the arrow, add its shift to the arrow position to have the full coordinates.

gdet commented 2 years ago

ok thank you!