ImagingDataCommons / highdicom

High-level DICOM abstractions for the Python programming language
https://highdicom.readthedocs.io
MIT License
169 stars 35 forks source link

Add method to get all graphic data of an annotation group #147

Closed hackermd closed 2 years ago

hackermd commented 2 years ago

Currently, the highdicom.ann.AnnotationGroup class only provides the get_coordinates() method to get the coordinates of a single graphical annotation. This method decodes the binary graphic data every time it is called.

This PR adds a get_graphic_data() method to get the coordinates of all graphical annotations at once. In addition, it adds a mechanism to cache the decoded coordinates data and thereby speed subsequent calls to either get_graphic_data() or get_coordinates().