X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=gdcmPython%2F__init__.py;h=26de4736dda7eb8520978e990b586ebd7422470e;hb=48c3e6379fcb2517d56c15d51e45c4c79543c16c;hp=e1b32c2a36194f0879246753b734a79c86414a0e;hpb=f59a9dc3480f900cf6ff80c7fe5a0c6e59c93512;p=gdcm.git diff --git a/gdcmPython/__init__.py b/gdcmPython/__init__.py index e1b32c2a..26de4736 100644 --- a/gdcmPython/__init__.py +++ b/gdcmPython/__init__.py @@ -17,11 +17,10 @@ def BuildInstallOrPreinstallPath(DirName, FileName): PreInstallModePath = os.path.join(__path__[0], "..", DirName + "/") if os.path.isfile(os.path.join(PreInstallModePath, FileName)): return PreInstallModePath - print "Unfound directory ", DirName return None ### Setup the path to the dictionaries. WARNING: this needs to be done -# BEFORE importation of the shadow classse generated by swig as found +# BEFORE importation of the shadow classes generated by swig as found # in gdcm, since the dynamic library loads the standard dictionary # when dynamically loaded. # We consider we succefully found the dictionaries path when we encounter @@ -42,6 +41,8 @@ except KeyError: ### Set up the path to the data images for the demos. GDCM_DATA_PATH = BuildInstallOrPreinstallPath("Test", "test.acr") +if not GDCM_DATA_PATH: + print "GDCM_DATA_PATH is not setup properly: unfound Test directory" ### Set up the path to the data images of the test suite. GDCM_TEST_DATA_PATH = BuildInstallOrPreinstallPath("gdcmData", "test.acr") @@ -57,3 +58,9 @@ except ImportError,e: gdcmHeader = gdcm.gdcmHeader gdcmDictSet = gdcm.gdcmDictSet gdcmFile = gdcm.gdcmFile + +def GetPubDictTagNames(): + return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictTagNames() + +def GetPubDictTagNamesByCategory(): + return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictTagNamesByCategory()