]> Creatis software - gdcm.git/blobdiff - gdcmPython/demo/printGroupedPublicDict.py
* Eventually, python/gdcmPython was renamed to gdcmPython. This
[gdcm.git] / gdcmPython / demo / printGroupedPublicDict.py
diff --git a/gdcmPython/demo/printGroupedPublicDict.py b/gdcmPython/demo/printGroupedPublicDict.py
new file mode 100644 (file)
index 0000000..153e173
--- /dev/null
@@ -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