Inability to access a particular set of DICOM tag through normal pydicom methods/attributes. #1353
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is a case of an old-style DICOM way of doing things (now handled by Sequences) where certain tags can be repeated. If you look in pydicom's
Notice the 'xx' - DICOM used to allow multiple tags to map to the same description, and therefore later with the advent of keywords, to the same keyword. I don't recall the details in pydicom - we could dig into it - but in general pydicom would not be able to access these by keyword, because there could be many data elements with that same keyword, e.g. (6000,0050), (6002, 0050), (60aa, 0050), ... anything that matches the 'xx'. The tag number is the only way to guarantee access to the intended data element. It's not something we've looked at in a long time - we should at least document this better, or perhaps the code could be modified to search for all matches and generate an error if more than one found, otherwise just return the one. But for setting data elements using the keyword, it would be harder - probably the user would somehow have to specify the 'xx'. So, it is a bit of a grey area - but certainly the documentation should point to this. Even better, a detailed error message on attempting keyword access for items in the |
Beta Was this translation helpful? Give feedback.
-
Setting repeating group elements is covered in the basics tutorial, as is a summary of what they are.
|
Beta Was this translation helpful? Give feedback.
-
@darcymason Appreciate the clarification regarding items in the RepeatersDictionary, will keep that in mind if we meet a similar issue in the future. @scaramallion My bad, I probably skimmed over the basic tutorial and didn't realise that pydicom does have a tutorial on handling Overlay Data (06xx, 3000). Thanks for the explanation! |
Beta Was this translation helpful? Give feedback.
This is a case of an old-style DICOM way of doing things (now handled by Sequences) where certain tags can be repeated. If you look in pydicom's
RepeatersDictionary
you will see this defined asNotice the 'xx' - DICOM used to allow multiple tags to map to the same description, and therefore later with the advent of keywords, to the same keyword.
I don't recall the details in pydicom - we could dig into it - but in general pydicom would not be able to access these by keyword, because there could be many data elements with that same keyword, e.g. (6000,0050), (6002, 0050), (60aa, 0050), ... anything that matches the 'xx'. The …