]> Creatis software - gdcm.git/blobdiff - gdcmPython/demo/ReorganiseFiles.py
* Add the update of header entries using the shadow library
[gdcm.git] / gdcmPython / demo / ReorganiseFiles.py
index 1ba6178e04f28a796e7764bbb7561407468b4ebb..54fcb420c762944563f6da7f40e8815267fcbb93 100644 (file)
@@ -1,4 +1,4 @@
-# Rename the dcm extension files of a given drectory according
+# Rename the dcm extension files of a given directory according
 # to series and image number information extracted in each respective header.
 
 from gdcmPython import *
@@ -30,7 +30,7 @@ SourceFiles=glob.glob(os.path.join(SourceDirectory, "*.dcm"))
 
 for file in SourceFiles:
    header = gdcmHeader(file)
-   info = header.GetPubElVal()
+   info = header.GetPubEntry()
    try:
       ImNum = info["Image Number"]
       if len(ImNum) == 0 or ImNum == "gdcm::Unfound":