X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FvtkGdcmDemo.py;h=128029604bfc319c885ac428e009e2c78e79e1c9;hb=8d10ccb6794a0f22234983990e2181a24625fbd8;hp=a6d14e4d44388c96530b07b31af4c06b17f2205b;hpb=256d6a32612f8bffdb7868749d7995fc74c0c03d;p=gdcm.git diff --git a/gdcmPython/demo/vtkGdcmDemo.py b/gdcmPython/demo/vtkGdcmDemo.py index a6d14e4d..12802960 100644 --- a/gdcmPython/demo/vtkGdcmDemo.py +++ b/gdcmPython/demo/vtkGdcmDemo.py @@ -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":