I need to add the corresponding text keys of tags to pydicom so it can read them from a DICOM file. So far I have been able to add the entries to the DICOM file using the add_new()
method. However, I still have to read these values using the hexa codes.
I have checked the documentation, and there is a method called add_private_dict_entries
for this. However, I cannot seem to find this method in pydicom. I have followed exactly as in the example:
from pydicom import Dataset
toing_dicom_attr = {
0x270f03e9: ('SH', 1, 'Was Viewed By TOINGTOING'),
0x270f03ea: ('SH', 1, 'At Least One toing toing'),
}
add_private_dict_entries("TOINGSCOMPANY", toing_dicom_attr)
However I get the following Error:
NameError: name 'add_private_dict_entries' is not defined
I have also tried using pydicom.datadict.add_private_dict_entries()
but it does not work. How can I get my private attributes to be readable by my pydicom installation.
Thank you in advance.