示例#1
0
def nitf_date_time(image_filename):
  boxm2_batch.init_process("vilNITFDateTimeProcess");
  boxm2_batch.set_input_string(0,image_filename);
  boxm2_batch.run_process();
  (id,type)=boxm2_batch.commit_output(0);
  year =  boxm2_batch.get_output_int(id);
  (id,type)=boxm2_batch.commit_output(1);
  month =  boxm2_batch.get_output_int(id);
  (id,type)=boxm2_batch.commit_output(2);
  day =  boxm2_batch.get_output_int(id);
  (id,type)=boxm2_batch.commit_output(3);
  hour = boxm2_batch.get_output_int(id);
  (id,type)=boxm2_batch.commit_output(4);
  minute = boxm2_batch.get_output_int(id);
  return year, month, day, hour, minute
示例#2
0
文件: vil_adaptor.py 项目: caioc2/vxl
def nitf_date_time(image_filename):
    boxm2_batch.init_process("vilNITFDateTimeProcess")
    boxm2_batch.set_input_string(0, image_filename)
    boxm2_batch.run_process()
    (id, type) = boxm2_batch.commit_output(0)
    year = boxm2_batch.get_output_int(id)
    (id, type) = boxm2_batch.commit_output(1)
    month = boxm2_batch.get_output_int(id)
    (id, type) = boxm2_batch.commit_output(2)
    day = boxm2_batch.get_output_int(id)
    (id, type) = boxm2_batch.commit_output(3)
    hour = boxm2_batch.get_output_int(id)
    (id, type) = boxm2_batch.commit_output(4)
    minute = boxm2_batch.get_output_int(id)
    return year, month, day, hour, minute
示例#3
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)
示例#4
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)
示例#5
0
def arf_stream(file_path) :
  boxm2_batch.init_process("bilCreateArfImageIstreamProcess")
  boxm2_batch.set_input_string(0,file_path);
  boxm2_batch.run_process();
  (id, type) = boxm2_batch.commit_output(0);
  stream = dbvalue(id, type);
  (id, type) = boxm2_batch.commit_output(1);
  numImgs = boxm2_batch.get_output_int(id);
  return stream, numImgs
示例#6
0
文件: vil_adaptor.py 项目: caioc2/vxl
def arf_stream(file_path):
    boxm2_batch.init_process("bilCreateArfImageIstreamProcess")
    boxm2_batch.set_input_string(0, file_path)
    boxm2_batch.run_process()
    (id, type) = boxm2_batch.commit_output(0)
    stream = dbvalue(id, type)
    (id, type) = boxm2_batch.commit_output(1)
    numImgs = boxm2_batch.get_output_int(id)
    return stream, numImgs
示例#7
0
def bae_raw_stream(file_path,ni=0,nj=0,pixelsize=0) :
  boxm2_batch.init_process("bilCreateRawImageIstreamProcess")
  boxm2_batch.set_input_string(0,file_path);
  boxm2_batch.set_input_int(1,ni);
  boxm2_batch.set_input_int(2,nj);
  boxm2_batch.set_input_int(3,pixelsize);
  boxm2_batch.run_process();
  (id, type) = boxm2_batch.commit_output(0);
  stream = dbvalue(id, type);
  (id, type) = boxm2_batch.commit_output(1);
  numImgs = boxm2_batch.get_output_int(id);
  return stream, numImgs
示例#8
0
文件: vil_adaptor.py 项目: caioc2/vxl
def bae_raw_stream(file_path, ni=0, nj=0, pixelsize=0):
    boxm2_batch.init_process("bilCreateRawImageIstreamProcess")
    boxm2_batch.set_input_string(0, file_path)
    boxm2_batch.set_input_int(1, ni)
    boxm2_batch.set_input_int(2, nj)
    boxm2_batch.set_input_int(3, pixelsize)
    boxm2_batch.run_process()
    (id, type) = boxm2_batch.commit_output(0)
    stream = dbvalue(id, type)
    (id, type) = boxm2_batch.commit_output(1)
    numImgs = boxm2_batch.get_output_int(id)
    return stream, numImgs
示例#9
0
def get_index_from_3d_point(scene, cache, point):
    batch.init_process("boxm2CppGetIndexFrom3dPointProcess")
    batch.set_input_from_db(0, scene)
    batch.set_input_from_db(1, cache)
    batch.set_input_float(2, point[0])
    batch.set_input_float(3, point[1])
    batch.set_input_float(4, point[2])
    batch.run_process()

    (id, type) = batch.commit_output(0)
    blk_i = batch.get_output_int(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    blk_j = batch.get_output_int(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    blk_k = batch.get_output_int(id)
    batch.remove_data(id)

    (id, type) = batch.commit_output(3)
    index = batch.get_output_int(id)
    batch.remove_data(id)

    return ((blk_i, blk_j, blk_k), index)
示例#10
0
def get_index_from_3d_point(scene, cache, point):
    batch.init_process("boxm2CppGetIndexFrom3dPointProcess")
    batch.set_input_from_db(0, scene)
    batch.set_input_from_db(1, cache)
    batch.set_input_float(2, point[0])
    batch.set_input_float(3, point[1])
    batch.set_input_float(4, point[2])
    batch.run_process()

    (id, type) = batch.commit_output(0)
    blk_i = batch.get_output_int(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    blk_j = batch.get_output_int(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    blk_k = batch.get_output_int(id)
    batch.remove_data(id)

    (id, type) = batch.commit_output(3)
    index = batch.get_output_int(id)
    batch.remove_data(id)

    return ((blk_i, blk_j, blk_k), index)
示例#11
0
def get_info_along_ray(scene, cache, cam, u, v, prefix, identifier=""):
    print("Ray  Probe")
    batch.init_process("boxm2CppRayProbeProcess")
    batch.set_input_from_db(0, scene)
    batch.set_input_from_db(1, cache)
    batch.set_input_from_db(2, cam)
    batch.set_input_unsigned(3, u)
    batch.set_input_unsigned(4, v)
    batch.set_input_string(5, prefix)
    batch.set_input_string(6, identifier)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    len_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    alpha_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    vis_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(3)
    tabs_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    res_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    if (prefix != ""):
        (id, type) = batch.commit_output(5)
        data_array_1d = batch.get_bbas_1d_array_float(id)
        batch.remove_data(id)
        (id, type) = batch.commit_output(6)
        nelems = batch.get_output_int(id)
        batch.remove_data(id)
        return len_array_1d, alpha_array_1d, vis_array_1d, tabs_array_1d, res_array_1d, data_array_1d, nelems
    else:
        return len_array_1d, alpha_array_1d, vis_array_1d, tabs_array_1d, res_array_1d
示例#12
0
def get_info_along_ray(scene, cache, cam, u, v, prefix, identifier=""):
    print("Ray  Probe")
    batch.init_process("boxm2CppRayProbeProcess")
    batch.set_input_from_db(0, scene)
    batch.set_input_from_db(1, cache)
    batch.set_input_from_db(2, cam)
    batch.set_input_unsigned(3, u)
    batch.set_input_unsigned(4, v)
    batch.set_input_string(5, prefix)
    batch.set_input_string(6, identifier)
    batch.run_process()
    (id, type) = batch.commit_output(0)
    len_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(1)
    alpha_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(2)
    vis_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(3)
    tabs_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    (id, type) = batch.commit_output(4)
    res_array_1d = batch.get_bbas_1d_array_float(id)
    batch.remove_data(id)
    if (prefix != ""):
        (id, type) = batch.commit_output(5)
        data_array_1d = batch.get_bbas_1d_array_float(id)
        batch.remove_data(id)
        (id, type) = batch.commit_output(6)
        nelems = batch.get_output_int(id)
        batch.remove_data(id)
        return len_array_1d, alpha_array_1d, vis_array_1d, tabs_array_1d, res_array_1d, data_array_1d, nelems
    else:
        return len_array_1d, alpha_array_1d, vis_array_1d, tabs_array_1d, res_array_1d