File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/IO/GDCM/ReadAndPrintDICOMTags Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 63
63
# GetMetaDataDictionary() method.
64
64
metadata = dicomIO .GetMetaDataDictionary ()
65
65
66
- # Print the key value pairsa from the metadadictionary
66
+ # Print the key value pairs from the metadadictionary
67
67
tagkeys = metadata .GetKeys ()
68
+
68
69
for tagkey in tagkeys :
69
70
# Note the [] operator for the key
70
- tagvalue = metadata [tagkey ]
71
- print (tagkey + '=' + str (tagvalue ))
71
+ try :
72
+ tagvalue = metadata [tagkey ]
73
+ print (tagkey + '=' + str (tagvalue ))
74
+ except RuntimeError :
75
+ #Cannot pass specialized values into metadata dictionary.
76
+ print ("Cannot pass specialized value" + tagkey + "into metadadictionary" )
77
+
72
78
73
79
# Illustrating use of getting a label given a tag here
74
80
entryID = "0010|0010"
You can’t perform that action at this time.
0 commit comments