]> Creatis software - gdcm.git/blob - gdcmPython/demo/printGroupedPublicDict.py
* Eventually, python/gdcmPython was renamed to gdcmPython. This
[gdcm.git] / gdcmPython / demo / printGroupedPublicDict.py
1 from gdcmPython import *
2
3 print "##############################################################"
4 print "### Display all the possible tags of the current public"
5 print "### dictionary"
6 print "##############################################################"
7 PubList = gdcmDictSet.GetPubDictTagNames()
8 for i in range(0, len(PubList)):
9    print "   ", PubList[i]
10
11 print "##############################################################"
12 print "### Display all the possible tags of the current public"
13 print "### dictionary, but grouped by using the Fourth field"
14 print "##############################################################"
15 PubDict = gdcmDictSet.GetPubDictTagNamesByCategory()
16 for fourth in PubDict:
17    print "   ############ Fourth group = ", fourth, " ##############"
18    for key in PubDict[fourth]:
19       print "   ", key