def run(self): while not self.kill_received: try: index = self.input_queue.get_nowait() except Queue.Empty: break # store the result [test_image,ni,nj]=openImage(self.input_path+frameSuffix(index,5)+".tiff"); dbbgm_batch.init_process("bbgmMeasureWvLookupProcess"); dbbgm_batch.set_input_from_db(0,self.wavelet); dbbgm_batch.set_input_from_db(1,test_image); dbbgm_batch.set_input_string(2,self.attribute); dbbgm_batch.set_input_float(3,self.tolerance); dbbgm_batch.set_input_string(4,self.interp_functor); dbbgm_batch.set_input_string(5,self.data_path); print dbbgm_batch.run_process(); out_image=dbvalue(0,"") (out_image.id,out_image.type)=dbbgm_batch.commit_output(0) saveImg(out_image,self.output_path+frameSuffix(index,3)+".tiff")
def run(self): while not self.kill_received: # get a task try: job = self.work_queue.get_nowait() except Queue.Empty: break # store the result [test_image,ni,nj]=openImage(job.test_image_path); dbbgm_batch.init_process("bbgmMeasureWvLookupProcess"); dbbgm_batch.set_input_from_db(0,job.wavelet); dbbgm_batch.set_input_from_db(1,test_image); dbbgm_batch.set_input_string(2,job.attribute); dbbgm_batch.set_input_float(3,job.tolerance); dbbgm_batch.set_input_string(4,job.interp_functor); dbbgm_batch.set_input_string(5,job.data_path); print dbbgm_batch.run_process(); out_image=dbvalue(0,"") (out_image.id,out_image.type)=dbbgm_batch.commit_output(0); saveImg(out_image,job.output_path)