How to use the neuroglancer.to_url function in neuroglancer

To help you get started, we’ve selected a few neuroglancer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / neuroglancer / python / neuroglancer / tool / agglomeration_split_tool.py View on Github external
def run_batch(args, graph):
    for path in args.split_seeds:
        split_seeds = load_split_seeds(path)
        split_result = do_split(graph=graph, split_seeds=split_seeds, agglo_id=args.agglo_id)
        state = display_split_result(
            graph=graph,
            split_seeds=split_seeds,
            image_url=args.image_url,
            segmentation_url=args.segmentation_url,
            **split_result)
        print('<p><a href="%s">%s</a></p>' % (neuroglancer.to_url(state), path))
github google / neuroglancer / python / neuroglancer / tool / video_tool.py View on Github external
def save_script(script_path, keypoints):
    temp_path = script_path + '.tmp'
    with open(temp_path, 'w') as f:
        for x in keypoints:
            f.write(neuroglancer.to_url(x['state']) + '\n')
            f.write(str(x['transition_duration']) + '\n')
    if hasattr(os, 'replace'):
        # Only available on Python3
        os.replace(temp_path, script_path)
    else:
        # Fails on Windows if script_path already exists
        os.rename(temp_path, script_path)
github google / neuroglancer / python / examples / extend_segments_tool.py View on Github external
def print_combined_state_url(self):
        print(neuroglancer.to_url(self.make_combined_state()))