X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FprintGroupedPublicDict.py;h=fa03c30fb6ff2cfe70e9cd3b4d388c8be182676e;hb=0574f31372f78bf8399e42ee04bd0010e684c440;hp=86a086b64aec8f7d4f7cc1444f8643646816cf43;hpb=9676e37a52824da2f69d22c721178a4b5dc12191;p=gdcm.git diff --git a/gdcmPython/demo/printGroupedPublicDict.py b/gdcmPython/demo/printGroupedPublicDict.py index 86a086b6..fa03c30f 100644 --- a/gdcmPython/demo/printGroupedPublicDict.py +++ b/gdcmPython/demo/printGroupedPublicDict.py @@ -1,14 +1,21 @@ -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 = 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