]> Creatis software - gdcm.git/commitdiff
* Bug fix in demos because of method names changed
authorregrain <regrain>
Thu, 22 Jan 2004 18:26:50 +0000 (18:26 +0000)
committerregrain <regrain>
Thu, 22 Jan 2004 18:26:50 +0000 (18:26 +0000)
   -- BeNours

gdcmPython/demo/ReorganiseFiles.py
gdcmPython/demo/explore.py
gdcmPython/demo/printGroupedPublicDict.py
gdcmPython/demo/testAll.py
gdcmPython/demo/vtkGdcmDemo.py

index 54fcb420c762944563f6da7f40e8815267fcbb93..3db13f4dffb8331209e7a68b2bcfcd2936ab2c5d 100644 (file)
@@ -30,7 +30,7 @@ SourceFiles=glob.glob(os.path.join(SourceDirectory, "*.dcm"))
 
 for file in SourceFiles:
    header = gdcmHeader(file)
-   info = header.GetPubEntry()
+   info = header.GetEntry()
    try:
       ImNum = info["Image Number"]
       if len(ImNum) == 0 or ImNum == "gdcm::Unfound":
index c5b253f29c111c42a773866a80af57d36779fc88..a72c79cde38cadd080e2bca7744ec542a79ebf4a 100644 (file)
@@ -11,7 +11,7 @@ if not os.path.isfile(FileName):
    sys.exit()
 
 toRead = gdcmHeader(FileName)
-ValDict = toRead.GetPubEntry()
+ValDict = toRead.GetEntry()
 ExploreElements = ["Patient's Name", "Patient ID",
                    "Study Date", "Study Time", "Study ID",
                    "Study Instance UID",
@@ -24,4 +24,4 @@ for elem in ExploreElements:
                print "[%s]" % ValDict[elem]
        except KeyError:
                print "NOT FOUND"
-               
+
index 636119d4cbdab76a0128a3408cac6470cab8c29f..fa03c30fb6ff2cfe70e9cd3b4d388c8be182676e 100644 (file)
@@ -4,7 +4,7 @@ print "##############################################################"
 print "### Display all the possible tags of the current public"
 print "### dictionary"
 print "##############################################################"
-PubList = GetPubDictTagNames()
+PubList = GetPubDictEntryNames()
 for i in range(0, len(PubList)):
    print "   ", PubList[i]
 
@@ -14,7 +14,7 @@ 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 = GetPubDictTagNamesByCategory()
+PubDict = GetPubDictEntryNamesByCategory()
 for fourth in PubDict:
    print "   ############ Fourth group = ", fourth, " ##############"
    for key in PubDict[fourth]:
index f67c2df745bd3151c34cc9605cbdaf0c3447595f..f210f8db9a41ad7be482aae3f73385e487c2a2a1 100644 (file)
@@ -33,6 +33,6 @@ if __name__ == '__main__':
       fileName = os.path.join(GDCM_TEST_DATA_PATH, file)
       print "############## file :", fileName
       toRead = gdcmHeader(fileName)
-      ValDict = toRead.GetPubEntry()
+      ValDict = toRead.GetEntry()
       for key in ValDict.keys():
           print "   [%s] = [%s]" %(key, ValDict[key])
index a6d14e4d44388c96530b07b31af4c06b17f2205b..128029604bfc319c885ac428e009e2c78e79e1c9 100644 (file)
@@ -40,9 +40,9 @@ class vtkHistogram:
          self.ComputeHisto()
       self.__CumulHisto = []
       histo = self.__Histo.GetOutput()
-      self.__CumulHisto.append(int(histo.GetScalarComponentAsFloat(0,0,0,0)))
+      self.__CumulHisto.append(int(histo.GetScalarComponentAsDouble(0,0,0,0)))
       for i in range(1, self.__NumberOfBins):
-         value = int(histo.GetScalarComponentAsFloat(i,0,0,0))
+         value = int(histo.GetScalarComponentAsDouble(i,0,0,0))
          self.__CumulHisto.append( self.__CumulHisto[i-1] + value)
 
    def GetTruncateLevels(self, LostPercentage):
@@ -179,7 +179,7 @@ if not check.IsReadable():
    print "The ", FileName, " file is not "
    print "   readable with gdcm. Sorry."
    sys.exit()
-check = check.GetPubEntry()
+check = check.GetEntry()
 try:
    HighBit = check["High Bit"]
    if len(HighBit) == 0 or HighBit == "gdcm::Unfound":