Closedown
This commit is contained in:
@@ -55,8 +55,8 @@ class Image(DeviceBase, Readable):
|
||||
def __init__(self, name, pixel):
|
||||
DeviceBase.__init__(self, name)
|
||||
self.pixel = pixel
|
||||
self.roi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM]
|
||||
self.broi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM]
|
||||
self.roi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM-1]
|
||||
self.broi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM-1]
|
||||
self.intensity = ImageIntensity(self)
|
||||
self.matrix = ImageMatrix(self)
|
||||
self.corrected_intensity = ImageCorrectedIntensity(self)
|
||||
@@ -76,6 +76,9 @@ class Image(DeviceBase, Readable):
|
||||
if filename is None:
|
||||
filename = self.pixel.get_image_filename()
|
||||
print "Calculating intensity for: " + filename + " - threshold: " + str((threshold1, threshold2, threshold3, threshold4))
|
||||
|
||||
roi = get_roi()
|
||||
bkroi = get_bg_roi()
|
||||
|
||||
tmp_file = self.pixel.image_root_folder + "tmp/spec_image_info.dat"
|
||||
copyfile(filename, tmp_file)
|
||||
@@ -83,7 +86,7 @@ class Image(DeviceBase, Readable):
|
||||
try:
|
||||
ret = img_get_int(tmp_file, threshold1, threshold2, threshold3, threshold4, \
|
||||
self.pixel.IMAGE_HEADER_LENGTH, self.pixel.PIX_XDIM, self.pixel.PIX_YDIM,self.pixel.PIX_COLOR_DEPTH, \
|
||||
self.roi[0], self.roi[1], self.roi[2], self.roi[3], self.broi[0], self.broi[1], self.broi[2], self.broi[3])
|
||||
roi[0], roi[1], roi[2], roi[3], bkroi[0], bkroi[1], bkroi[2], bkroi[3])
|
||||
except:
|
||||
log("Error calculating intensity: " + str(filename) + " - " + str(sys.exc_info()[1]), False)
|
||||
ret = None
|
||||
|
||||
Reference in New Issue
Block a user