ImagingDataCommons / highdicom

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

Update import of storage class UIDs #160

Closed hackermd closed 2 years ago

hackermd commented 2 years ago

In the next pydicom release, storage class UIDs will become importable from pydicom.uid (see https://github.com/pydicom/pydicom/blob/master/pydicom/_storage_sopclass_uids.py) and the private _storage_class_uid.py module will be deprecated. We should consider updating highdicom once pydicom 2.3 is out.

fedorov commented 2 years ago

It's tangentially related, and I apologize for the distraction, but do you guys know: 1) what is the process that keeps UIDs in pydicom.uid in sync with the standard? 2) why there is no equivalent for uid.AllTransferSyntaxes for storage SOP classes?

CPBridge commented 2 years ago

@fedorov

  1. I believe that these are updated "semi-automatically" by someone running this script every so often:

https://github.com/pydicom/pydicom/blob/master/source/generate_uids/generate_storage_sopclass_uids.py

  1. Not sure, probably no good reason. I imagine a PR to add it would be welcome. This gets you nearly there except for MediaStorageDirectoryStorage:
import pydicom

all_sopclass_uids = [
    v for v in pydicom.uid.__dict__.values()
    if isinstance(v, pydicom.uid.UID) and v.startswith("1.2.840.10008.5")
]
CPBridge commented 2 years ago

This was addressed in #163, closing