vendredi 10 juin 2016

Trouble finding certain tag values


I'm trying to find the value of several tags using pydicom. For some reason only certain tags work while others do not. Below is a traceback explaining my problem. Can anyone see a way around the int() base 16 problem?

>>> ds['0x18','0x21'].value
'SP'
>>> ds['0x18','13x14'].value
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/space/jazz/1/users/gwarner/anaconda/lib/python2.7/site-packages/pydicom-0.9.9-py2.7.egg/dicom/dataset.py", line 276, in __getitem__
tag = Tag(key)
  File "/space/jazz/1/users/gwarner/anaconda/lib/python2.7/site-packages/pydicom-0.9.9-py2.7.egg/dicom/tag.py", line 27, in Tag
arg = (int(arg[0], 16), int(arg[1], 16))
ValueError: invalid literal for int() with base 16: '13x14'

Aucun commentaire:

Enregistrer un commentaire