DICOM attribute from Keyword


Is it possible to look up a DICOM attribute using its DICOM keyword in ITK? Also, is it possible to determine the value representation of an attribute using its tag or keyword?

For example, I’d like to lookup the patient’s name using the DICOM keyword “PatientName” instead of the tag “0010|0010”, and determine its DICOM value representation (which is “PN”). I see that the gdcm::Dict and gdcm::DictEntry classes provide these capabilities, but I couldn’t determine if these capabilities are surfaced in ITK. All I could find was the itk::MetaDataDictionary class, which seems to support looking up attributes by tag only, if I’m not mistaken.

Ref: http://gdcm.sourceforge.net/html/classgdcm_1_1Dict.html#a7d6bef0a3a56a14d4565759081750566


Hi Fijoy,

Typed, named attributes is the goal of the ITKDICOM module. Contributions are welcome! :sunny:


Hey Matt,

After some research, I found that GDCM contains an in-memory representation of the DICOM standard dictionary (GDCM refers to this as public dictionary), as accessed in this sample code:


I was able to successfully convert a few example DICOM keywords into tags using this public dictionary within my ITK interface code. Is this a good workaround?


1 Like

Yes, sounds like a good workaround.