How to export qupath annotion

Hi
I have do some annotion work with qupath. However, I have no idea how to visualize my work with python, the only thing I got is qpdata. So how can I export this annotion data with python or other programing language?

You may want to look into exporting the annotations as a json file or some other format that can be read by other programs rather than using a Java serial object.

You may want to look into something like this, although I’ve never tried this and am no expert.

qpdata files use Java serialization are only supported within QuPath. Trying to read them in anything else would be extremely complex… to the point of really not being worth it.

As @Research_Associate suggestions, you should use QuPath to read the data and script the export to some other format.

1 Like

thanks!It helped a lot, however I still don’t know how can I write the annotion points into a .json file, such as your ImageIO to write an image.

Again, I’ve never played with it, but the sample script shows how to save objects into json, and restore them. I suspect each annotation could be an object. Have you looked at the results of storing an annotation into the json file?

If you are having trouble interacting with objects, this might help:
https://gist.github.com/Svidro/8f9c06e2c8bcae214cdd7aa9afe57c50

1 Like