def image_size(img): boxm2_batch.init_process('vilImageSizeProcess') boxm2_batch.set_input_from_db(0, img) boxm2_batch.run_process() (id, type) = boxm2_batch.commit_output(0) ni = boxm2_batch.get_output_unsigned(id) (id, type) = boxm2_batch.commit_output(1) nj = boxm2_batch.get_output_unsigned(id) return ni, nj
def image_size(img): boxm2_batch.init_process('vilImageSizeProcess') boxm2_batch.set_input_from_db(0,img) boxm2_batch.run_process() (id,type) = boxm2_batch.commit_output(0) ni = boxm2_batch.get_output_unsigned(id) (id,type) = boxm2_batch.commit_output(1) nj = boxm2_batch.get_output_unsigned(id) return ni,nj
def load_image(file_path) : boxm2_batch.init_process("vilLoadImageViewProcess"); boxm2_batch.set_input_string(0, file_path); boxm2_batch.run_process(); (id,type) = boxm2_batch.commit_output(0); (ni_id, ni_type) = boxm2_batch.commit_output(1); (nj_id, nj_type) = boxm2_batch.commit_output(2); ni = boxm2_batch.get_output_unsigned(ni_id); nj = boxm2_batch.get_output_unsigned(nj_id); img = dbvalue(id,type); boxm2_batch.remove_data(ni_id) boxm2_batch.remove_data(nj_id) return img, ni, nj;
def load_image(file_path): boxm2_batch.init_process("vilLoadImageViewProcess") boxm2_batch.set_input_string(0, file_path) boxm2_batch.run_process() (id, type) = boxm2_batch.commit_output(0) (ni_id, ni_type) = boxm2_batch.commit_output(1) (nj_id, nj_type) = boxm2_batch.commit_output(2) ni = boxm2_batch.get_output_unsigned(ni_id) nj = boxm2_batch.get_output_unsigned(nj_id) img = dbvalue(id, type) boxm2_batch.remove_data(ni_id) boxm2_batch.remove_data(nj_id) return img, ni, nj
def get_number_of_planes(img): boxm2_batch.init_process("vilGetNumberOfPlanesProcess"); boxm2_batch.set_input_from_db(0, img); boxm2_batch.run_process(); (id, type) = boxm2_batch.commit_output(0); n_planes = boxm2_batch.get_output_unsigned(id) return n_planes;
def arf_next_frame(rawStream) : boxm2_batch.init_process("bilArfReadFrameProcess") boxm2_batch.set_input_from_db(0,rawStream); boxm2_batch.run_process(); (id, type) = boxm2_batch.commit_output(0); img = dbvalue(id,type); (id, type) = boxm2_batch.commit_output(1); time = boxm2_batch.get_output_unsigned(id); return img, time
def arf_next_frame(rawStream): boxm2_batch.init_process("bilArfReadFrameProcess") boxm2_batch.set_input_from_db(0, rawStream) boxm2_batch.run_process() (id, type) = boxm2_batch.commit_output(0) img = dbvalue(id, type) (id, type) = boxm2_batch.commit_output(1) time = boxm2_batch.get_output_unsigned(id) return img, time
def arf_seek_frame(rawStream, frame) : boxm2_batch.init_process("bilArfSeekFrameProcess") boxm2_batch.set_input_from_db(0,rawStream); boxm2_batch.set_input_unsigned(1,frame); boxm2_batch.run_process(); (id, type) = boxm2_batch.commit_output(0); img = dbvalue(id,type); (id, type) = boxm2_batch.commit_output(1); time = boxm2_batch.get_output_unsigned(id); return img, time
def get_output_unsigned(id): uval = boxm2_batch.get_output_unsigned(id) return uval