X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FvtkGdcmDemo.py;h=128029604bfc319c885ac428e009e2c78e79e1c9;hb=7b3410ee413b056e0e599a4800ea836c8b56152b;hp=f1e1c26f3f4160bc0fdd42442ddf7bb247ad234d;hpb=00bc08e9b8fd5aadac41221a071783ef3d485f94;p=gdcm.git diff --git a/gdcmPython/demo/vtkGdcmDemo.py b/gdcmPython/demo/vtkGdcmDemo.py index f1e1c26f..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.GetPubElVal() +check = check.GetEntry() try: HighBit = check["High Bit"] if len(HighBit) == 0 or HighBit == "gdcm::Unfound":