]> Creatis software - gdcm.git/blob - gdcmPython/demo/printGroupedPublicDict.py
86a086b64aec8f7d4f7cc1444f8643646816cf43
[gdcm.git] / gdcmPython / demo / printGroupedPublicDict.py
1 from load import *
2 toRead = gdcm.gdcmHeader(FileName)
3 toRead.LoadElements()
4
5 print "##############################################################"
6 print "### Display all the possible tags of the current public"
7 print "### dictionary, but grouped by using the Fourth field"
8 print "##############################################################"
9 AllDictFields = toRead.GetPubTagNamesByCategory()
10 for fourth in AllDictFields.keys():
11         print "   ############ Fourth group = ", fourth, " ##############"
12         for entry in  AllDictFields[fourth]:
13                 print "   ", entry
14