コード例 #1
0
ファイル: genwatersheds.py プロジェクト: NealJMD/gala-scripts
def write_h5(arr, path, group="stack", print_top_image=True, dry=False):
    arr += 1
    print "Writing stack with shape %s to %s" % (str(arr.shape), path)
    ensure_file(path)
    if not dry:
        imio.write_h5_stack(arr, path, group=group, compression="lzf")
    if not print_top_image: return
    top_im = arr[0,:,:][np.newaxis,:,:]
    colors = h5topng.build_color_map(top_im,"random")
    h5topng.output_pngs(top_im, colors, path+"-top-")
コード例 #2
0
ファイル: combinedsets.py プロジェクト: NealJMD/gala-scripts
def write_h5(arr, path, group):
    print "Writing stack with shape %s to %s" % (str(arr.shape), path)
    ensure_file(path)
    imio.write_h5_stack(arr, path, group=group, compression="lzf")