X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FprintGroupedPublicDict.py;h=fa03c30fb6ff2cfe70e9cd3b4d388c8be182676e;hb=dbb25a7b734864a11ba84a5089f7b5e647099f0a;hp=1dcd2f79897b1e9b7cdf8cf525cf1420e39a3a23;hpb=b7f909f6f6c37085bb05debd27c375c826c1ce74;p=gdcm.git diff --git a/gdcmPython/demo/printGroupedPublicDict.py b/gdcmPython/demo/printGroupedPublicDict.py index 1dcd2f79..fa03c30f 100644 --- a/gdcmPython/demo/printGroupedPublicDict.py +++ b/gdcmPython/demo/printGroupedPublicDict.py @@ -1,14 +1,21 @@ from gdcmPython import * -toRead = gdcmHeader(FileName) -toRead.LoadElements() 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 = GetPubDictEntryNames() +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 "##############################################################" +print " WARNING : the 'fourth' fiels IS NOT part of DICOM" +print " DO NOT use it" +PubDict = GetPubDictEntryNamesByCategory() +for fourth in PubDict: + print " ############ Fourth group = ", fourth, " ##############" + for key in PubDict[fourth]: + print " ", key