Exemplo n.º 1
0
def image_size(img):
    bvxm_batch.init_process('vilImageSizeProcess')
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    ni = bvxm_batch.get_output_unsigned(id)
    (id, type) = bvxm_batch.commit_output(1)
    nj = bvxm_batch.get_output_unsigned(id)
    return ni, nj
Exemplo n.º 2
0
def image_size(img):
    bvxm_batch.init_process('vilImageSizeProcess')
    bvxm_batch.set_input_from_db(0,img)
    bvxm_batch.run_process()
    (id,type) = bvxm_batch.commit_output(0)
    ni = bvxm_batch.get_output_unsigned(id)
    (id,type) = bvxm_batch.commit_output(1)
    nj = bvxm_batch.get_output_unsigned(id)
    return ni,nj
Exemplo n.º 3
0
def bvxm_load_image(file_path):
    bvxm_batch.init_process("vilLoadImageViewProcess")
    bvxm_batch.set_input_string(0, file_path)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
Exemplo n.º 4
0
def bvxm_load_image_resource(file_path) :
  bvxm_batch.init_process("vilLoadImageResourceProcess");
  bvxm_batch.set_input_string(0, file_path);
  bvxm_batch.run_process();
  (id,type) = bvxm_batch.commit_output(0);
  (ni_id, ni_type) = bvxm_batch.commit_output(1);
  (nj_id, nj_type) = bvxm_batch.commit_output(2);
  ni = bvxm_batch.get_output_unsigned(ni_id);
  nj = bvxm_batch.get_output_unsigned(nj_id);
  img = dbvalue(id,type);
  bvxm_batch.remove_data(ni_id)
  bvxm_batch.remove_data(nj_id)
  return img, ni, nj;
Exemplo n.º 5
0
def bvxm_load_image_resource(file_path):
    bvxm_batch.init_process("vilLoadImageResourceProcess")
    bvxm_batch.set_input_string(0, file_path)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
Exemplo n.º 6
0
def bvxm_load_image(file_path) :
  bvxm_batch.init_process("vilLoadImageViewProcess");
  bvxm_batch.set_input_string(0, file_path);
  bvxm_batch.run_process();
  (id,type) = bvxm_batch.commit_output(0);
  (ni_id, ni_type) = bvxm_batch.commit_output(1);
  (nj_id, nj_type) = bvxm_batch.commit_output(2);
  ni = bvxm_batch.get_output_unsigned(ni_id);
  nj = bvxm_batch.get_output_unsigned(nj_id);
  img = dbvalue(id,type);
  bvxm_batch.remove_data(ni_id)
  bvxm_batch.remove_data(nj_id)
  return img, ni, nj;
Exemplo n.º 7
0
def bvxm_load_image(file_path):
    bvxm_batch.init_process("vilLoadImageViewProcess")
    bvxm_batch.set_input_string(0, file_path)
    status = bvxm_batch.run_process()
    if not status:
        return None, 0, 0
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
Exemplo n.º 8
0
def bvxm_load_image_resource(file_path):
    bvxm_batch.init_process("vilLoadImageResourceProcess")
    bvxm_batch.set_input_string(0, file_path)
    status = bvxm_batch.run_process()
    if not status:
      return None, 0, 0
    (id, type) = bvxm_batch.commit_output(0)
    (ni_id, ni_type) = bvxm_batch.commit_output(1)
    (nj_id, nj_type) = bvxm_batch.commit_output(2)
    ni = bvxm_batch.get_output_unsigned(ni_id)
    nj = bvxm_batch.get_output_unsigned(nj_id)
    img = dbvalue(id, type)
    bvxm_batch.remove_data(ni_id)
    bvxm_batch.remove_data(nj_id)
    return img, ni, nj
Exemplo n.º 9
0
def remove_nitf_margin(img_res):
    bvxm_batch.init_process("vilNITFRemoveMarginProcess")
    bvxm_batch.set_input_from_db(0, img_res)
    status = bvxm_batch.run_process()
    if status:
        (id, type) = bvxm_batch.commit_output(0)
        vi = bvxm_batch.get_output_unsigned(id)
        (id, type) = bvxm_batch.commit_output(1)
        vj = bvxm_batch.get_output_unsigned(id)
        (id, type) = bvxm_batch.commit_output(2)
        vni = bvxm_batch.get_output_unsigned(id)
        (id, type) = bvxm_batch.commit_output(3)
        vnj = bvxm_batch.get_output_unsigned(id)
        return vi, vj, vni, vnj
    else:
        return 0, 0, 0, 0
Exemplo n.º 10
0
def create_scene_large_scale(roi_kml,
                             scene_root,
                             world_dir,
                             dem_folder,
                             world_size=500.0,
                             voxel_size=1.0,
                             height_diff=120.0,
                             height_sub=25.0,
                             land_folder=""):
    batch.init_process("bvxmCreateSceneXmlLargeScaleProcess")
    batch.set_input_string(0, roi_kml)
    batch.set_input_string(1, scene_root)
    batch.set_input_string(2, world_dir)
    batch.set_input_string(3, dem_folder)
    batch.set_input_string(4, land_folder)
    batch.set_input_float(5, world_size)
    batch.set_input_float(6, voxel_size)
    batch.set_input_float(7, height_diff)
    batch.set_input_float(8, height_sub)
    status = batch.run_process()
    if status:
        (id, type) = batch.commit_output(0)
        n_scenes = batch.get_output_unsigned(id)
        return n_scenes
    else:
        return 0
Exemplo n.º 11
0
def get_number_of_planes(img):
    bvxm_batch.init_process("vilGetNumberOfPlanesProcess")
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    n_planes = bvxm_batch.get_output_unsigned(id)
    return n_planes
Exemplo n.º 12
0
def get_number_of_planes(img):
  bvxm_batch.init_process("vilGetNumberOfPlanesProcess");
  bvxm_batch.set_input_from_db(0, img);
  bvxm_batch.run_process();
  (id, type) = bvxm_batch.commit_output(0);
  n_planes = bvxm_batch.get_output_unsigned(id)
  return n_planes;
Exemplo n.º 13
0
def remove_nitf_margin(img_res):
  bvxm_batch.init_process("vilNITFRemoveMarginProcess")
  bvxm_batch.set_input_from_db(0, img_res)
  status = bvxm_batch.run_process()
  if status:
    (id, type) = bvxm_batch.commit_output(0)
    vi  = bvxm_batch.get_output_unsigned(id)
    (id, type) = bvxm_batch.commit_output(1)
    vj  = bvxm_batch.get_output_unsigned(id)
    (id, type) = bvxm_batch.commit_output(2)
    vni = bvxm_batch.get_output_unsigned(id)
    (id, type) = bvxm_batch.commit_output(3)
    vnj = bvxm_batch.get_output_unsigned(id)
    return vi, vj, vni, vnj
  else:
    return 0, 0, 0, 0
Exemplo n.º 14
0
def arf_next_frame(rawStream):
    bvxm_batch.init_process("bilArfReadFrameProcess")
    bvxm_batch.set_input_from_db(0, rawStream)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    img = dbvalue(id, type)
    (id, type) = bvxm_batch.commit_output(1)
    time = bvxm_batch.get_output_unsigned(id)
    return img, time
Exemplo n.º 15
0
def arf_next_frame(rawStream) :
  bvxm_batch.init_process("bilArfReadFrameProcess")
  bvxm_batch.set_input_from_db(0,rawStream);
  bvxm_batch.run_process();
  (id, type) = bvxm_batch.commit_output(0);
  img = dbvalue(id,type);
  (id, type) = bvxm_batch.commit_output(1);
  time = bvxm_batch.get_output_unsigned(id);
  return img, time
Exemplo n.º 16
0
def get_number_of_planes(img):
  bvxm_batch.init_process("vilGetPlaneProcess");
  bvxm_batch.set_input_from_db(0, img);
  bvxm_batch.set_input_unsigned(1, plane_id);
  bvxm_batch.run_process();
  (id, type) = bvxm_batch.commit_output(0);
  img_plane = dbvalue(id, type);
  (id, type) = bvxm_batch.commit_output(1);
  n_planes = bvxm_batch.get_output_unsigned(id)
  return img_plane, n_planes;
Exemplo n.º 17
0
def get_number_of_planes(img):
    bvxm_batch.init_process("vilGetPlaneProcess")
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.set_input_unsigned(1, plane_id)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    img_plane = dbvalue(id, type)
    (id, type) = bvxm_batch.commit_output(1)
    n_planes = bvxm_batch.get_output_unsigned(id)
    return img_plane, n_planes
Exemplo n.º 18
0
def arf_seek_frame(rawStream, frame):
    bvxm_batch.init_process("bilArfSeekFrameProcess")
    bvxm_batch.set_input_from_db(0, rawStream)
    bvxm_batch.set_input_unsigned(1, frame)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    img = dbvalue(id, type)
    (id, type) = bvxm_batch.commit_output(1)
    time = bvxm_batch.get_output_unsigned(id)
    return img, time
Exemplo n.º 19
0
def arf_seek_frame(rawStream, frame) :
  bvxm_batch.init_process("bilArfSeekFrameProcess")
  bvxm_batch.set_input_from_db(0,rawStream);
  bvxm_batch.set_input_unsigned(1,frame);
  bvxm_batch.run_process();
  (id, type) = bvxm_batch.commit_output(0);
  img = dbvalue(id,type);
  (id, type) = bvxm_batch.commit_output(1);
  time = bvxm_batch.get_output_unsigned(id);
  return img, time
Exemplo n.º 20
0
def geo_index_region_poly_resource(geo_index_txt, poly_kml, out_file):
    bvxm_batch.init_process("bvglGeoIndexRegionPolyResourceProcess")
    bvxm_batch.set_input_string(0, geo_index_txt)
    bvxm_batch.set_input_string(1, poly_kml)
    bvxm_batch.set_input_string(2, out_file)
    status = bvxm_batch.run_process()
    if status:
        (id, type) = bvxm_batch.commit_output(0)
        n_leaves = bvxm_batch.get_output_unsigned(id)
        return n_leaves
    else:
        return 0
Exemplo n.º 21
0
def geo_index_region_poly_resource(geo_index_txt, poly_kml, out_file):
    bvxm_batch.init_process("bvglGeoIndexRegionPolyResourceProcess")
    bvxm_batch.set_input_string(0, geo_index_txt)
    bvxm_batch.set_input_string(1, poly_kml)
    bvxm_batch.set_input_string(2, out_file)
    status = bvxm_batch.run_process()
    if status:
        (id, type) = bvxm_batch.commit_output(0)
        n_leaves = bvxm_batch.get_output_unsigned(id)
        return n_leaves
    else:
        return 0
Exemplo n.º 22
0
def geo_index_region_resource(geo_index_txt, ll_lon, ll_lat, ur_lon, ur_lat, out_file):
    bvxm_batch.init_process("bvglGeoIndexRegionResourceProcess")
    bvxm_batch.set_input_string(0, geo_index_txt)
    bvxm_batch.set_input_double(1, ll_lon)
    bvxm_batch.set_input_double(2, ll_lat)
    bvxm_batch.set_input_double(3, ur_lon)
    bvxm_batch.set_input_double(4, ur_lat)
    bvxm_batch.set_input_string(5, out_file)
    status = bvxm_batch.run_process()
    if status:
        (id, type) = bvxm_batch.commit_output(0)
        n_leaves = bvxm_batch.get_output_unsigned(id)
        return n_leaves
    else:
        return 0
Exemplo n.º 23
0
def geo_index_region_resource(geo_index_txt, ll_lon, ll_lat, ur_lon, ur_lat,
                              out_file):
    bvxm_batch.init_process("bvglGeoIndexRegionResourceProcess")
    bvxm_batch.set_input_string(0, geo_index_txt)
    bvxm_batch.set_input_double(1, ll_lon)
    bvxm_batch.set_input_double(2, ll_lat)
    bvxm_batch.set_input_double(3, ur_lon)
    bvxm_batch.set_input_double(4, ur_lat)
    bvxm_batch.set_input_string(5, out_file)
    status = bvxm_batch.run_process()
    if status:
        (id, type) = bvxm_batch.commit_output(0)
        n_leaves = bvxm_batch.get_output_unsigned(id)
        return n_leaves
    else:
        return 0
Exemplo n.º 24
0
def create_scene_large_scale(roi_kml, scene_root, world_dir, dem_folder, world_size=500.0, voxel_size=1.0, height_diff=120.0, height_sub=25.0, land_folder=""):
    batch.init_process("bvxmCreateSceneXmlLargeScaleProcess")
    batch.set_input_string(0, roi_kml)
    batch.set_input_string(1, scene_root)
    batch.set_input_string(2, world_dir)
    batch.set_input_string(3, dem_folder)
    batch.set_input_string(4, land_folder)
    batch.set_input_float(5, world_size)
    batch.set_input_float(6, voxel_size)
    batch.set_input_float(7, height_diff)
    batch.set_input_float(8, height_sub)
    status = batch.run_process()
    if status:
        (id, type) = batch.commit_output(0)
        n_scenes = batch.get_output_unsigned(id)
        return n_scenes
    else:
        return 0
Exemplo n.º 25
0
def get_output_unsigned(id):
    uval = bvxm_batch.get_output_unsigned(id)
    return uval
Exemplo n.º 26
0
def get_output_unsigned(id):
    uval = bvxm_batch.get_output_unsigned(id)
    return uval