forked from google/neuroglancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_tool.py
More file actions
24 lines (20 loc) · 713 Bytes
/
Copy pathexample_tool.py
File metadata and controls
24 lines (20 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import argparse
import webbrowser
import neuroglancer
import neuroglancer.cli
if __name__ == '__main__':
ap = argparse.ArgumentParser()
neuroglancer.cli.add_server_arguments(ap)
args = ap.parse_args()
neuroglancer.cli.handle_server_arguments(args)
viewer = neuroglancer.Viewer()
with viewer.txn() as s:
s.layers['image'] = neuroglancer.ImageLayer(
source='precomputed://gs://neuroglancer-public-data/flyem_fib-25/image',
tool_bindings={
'A': neuroglancer.ShaderControlTool(control='normalized'),
'B': neuroglancer.OpacityTool(),
},
)
print(viewer)
webbrowser.open_new(viewer.get_viewer_url())