Esempio n. 1
0
def image_range(img):
    boxm2_batch.init_process('vilImageRangeProcess')
    boxm2_batch.set_input_from_db(0, img)
    boxm2_batch.run_process()
    (id, type) = boxm2_batch.commit_output(0)
    minVal = boxm2_batch.get_output_float(id)
    (id, type) = boxm2_batch.commit_output(1)
    maxVal = boxm2_batch.get_output_float(id)
    return minVal, maxVal
Esempio n. 2
0
def image_range(img):
    boxm2_batch.init_process('vilImageRangeProcess')
    boxm2_batch.set_input_from_db(0,img)
    boxm2_batch.run_process()
    (id,type) = boxm2_batch.commit_output(0)
    minVal = boxm2_batch.get_output_float(id)
    (id,type) = boxm2_batch.commit_output(1)
    maxVal = boxm2_batch.get_output_float(id)
    return minVal, maxVal
Esempio n. 3
0
def image_mean(img):
  boxm2_batch.init_process("vilImageMeanProcess")
  boxm2_batch.set_input_from_db(0,img)
  boxm2_batch.run_process()
  (id,type) = boxm2_batch.commit_output(0)
  mean_val = boxm2_batch.get_output_float(id)
  boxm2_batch.remove_data(id)
  return mean_val
Esempio n. 4
0
def image_mean(img):
    boxm2_batch.init_process("vilImageMeanProcess")
    boxm2_batch.set_input_from_db(0, img)
    boxm2_batch.run_process()
    (id, type) = boxm2_batch.commit_output(0)
    mean_val = boxm2_batch.get_output_float(id)
    boxm2_batch.remove_data(id)
    return mean_val
Esempio n. 5
0
def pixel(img, point):
    boxm2_batch.init_process("vilPixelValueProcess")
    boxm2_batch.set_input_from_db(0,img)
    boxm2_batch.set_input_int(1, int(point[0]))
    boxm2_batch.set_input_int(2, int(point[1]))
    boxm2_batch.run_process()
    (id,type) = boxm2_batch.commit_output(0)
    val = boxm2_batch.get_output_float(id)
    return val
Esempio n. 6
0
def pixel(img, point):
    boxm2_batch.init_process("vilPixelValueProcess")
    boxm2_batch.set_input_from_db(0, img)
    boxm2_batch.set_input_int(1, int(point[0]))
    boxm2_batch.set_input_int(2, int(point[1]))
    boxm2_batch.run_process()
    (id, type) = boxm2_batch.commit_output(0)
    val = boxm2_batch.get_output_float(id)
    return val
Esempio n. 7
0
def get_3d_point_from_index(scene, cache, block_index, index):
    # Warning, you probably shouldn't be doing this!
    batch.init_process("boxm2CppGet3dPointFromIndexProcess")
    batch.set_input_from_db(0, scene)
    batch.set_input_from_db(1, cache)
    batch.set_input_int(2, block_index[0])
    batch.set_input_int(3, block_index[1])
    batch.set_input_int(4, block_index[2])
    batch.set_input_int(5, index)
    batch.run_process()

    (id, type) = batch.commit_output(0)
    x = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    y = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    z = batch.get_output_float(id)
    batch.remove_data(id)

    (id, type) = batch.commit_output(3)
    xs = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    ys = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(5)
    zs = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(6)
    leaf = batch.get_output_int(id)
    batch.remove_data(id)

    return ((x, y, z), (xs, ys, zs), leaf)
Esempio n. 8
0
def get_3d_point_from_index(scene, cache, block_index, index):
    # Warning, you probably shouldn't be doing this!
    batch.init_process("boxm2CppGet3dPointFromIndexProcess")
    batch.set_input_from_db(0, scene)
    batch.set_input_from_db(1, cache)
    batch.set_input_int(2, block_index[0])
    batch.set_input_int(3, block_index[1])
    batch.set_input_int(4, block_index[2])
    batch.set_input_int(5, index)
    batch.run_process()

    (id, type) = batch.commit_output(0)
    x = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    y = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    z = batch.get_output_float(id)
    batch.remove_data(id)

    (id, type) = batch.commit_output(3)
    xs = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    ys = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(5)
    zs = batch.get_output_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(6)
    leaf = batch.get_output_int(id)
    batch.remove_data(id)

    return ((x, y, z), (xs, ys, zs), leaf)
Esempio n. 9
0
def get_output_float(id):
    fval = boxm2_batch.get_output_float(id)
    return fval
Esempio n. 10
0
def get_output_float(id):
  fval = boxm2_batch.get_output_float(id)
  return fval