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":
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",
print "[%s]" % ValDict[elem]
except KeyError:
print "NOT FOUND"
-
+
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]
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]:
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])
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):
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":