X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=gdcmPython%2Fdemo%2FprintGroupedPublicDict.py;fp=gdcmPython%2Fdemo%2FprintGroupedPublicDict.py;h=153e173b5f97d822a3eed425849f208998f5e469;hb=29f93a14132dd0c6d9d9480ea038a2a4e8ed7e93;hp=0000000000000000000000000000000000000000;hpb=53a2dad942e500f2e65af646528b907fa3eaa8ec;p=gdcm.git diff --git a/gdcmPython/demo/printGroupedPublicDict.py b/gdcmPython/demo/printGroupedPublicDict.py new file mode 100644 index 00000000..153e173b --- /dev/null +++ b/gdcmPython/demo/printGroupedPublicDict.py @@ -0,0 +1,19 @@ +from gdcmPython import * + +print "##############################################################" +print "### Display all the possible tags of the current public" +print "### dictionary" +print "##############################################################" +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