]> Creatis software - gdcm.git/blobdiff - gdcmPython/demo/printGroupedPublicDict.py
remplacement include gdcm.h
[gdcm.git] / gdcmPython / demo / printGroupedPublicDict.py
index 86a086b64aec8f7d4f7cc1444f8643646816cf43..153e173b5f97d822a3eed425849f208998f5e469 100644 (file)
@@ -1,14 +1,19 @@
-from load import *
-toRead = gdcm.gdcmHeader(FileName)
-toRead.LoadElements()
+from gdcmPython import *
 
 print "##############################################################"
 print "### Display all the possible tags of the current public"
-print "### dictionary, but grouped by using the Fourth field"
+print "### dictionary"
 print "##############################################################"
-AllDictFields = toRead.GetPubTagNamesByCategory()
-for fourth in AllDictFields.keys():
-       print "   ############ Fourth group = ", fourth, " ##############"
-       for entry in  AllDictFields[fourth]:
-               print "   ", entry
+PubList = gdcmDictSet.GetPubDictTagNames()
+for i in range(0, len(PubList)):
+   print "   ", PubList[i]
 
+print "##############################################################"
+print "### Display all the possible tags of the current public"
+print "### dictionary, but grouped by using the Fourth field"
+print "##############################################################"
+PubDict = gdcmDictSet.GetPubDictTagNamesByCategory()
+for fourth in PubDict:
+   print "   ############ Fourth group = ", fourth, " ##############"
+   for key in PubDict[fourth]:
+      print "   ", key