-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_row_layout.py
More file actions
29 lines (25 loc) · 978 Bytes
/
example_row_layout.py
File metadata and controls
29 lines (25 loc) · 978 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
25
26
27
28
29
from __future__ import print_function
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',
)
s.layers['ground_truth'] = neuroglancer.SegmentationLayer(
source='precomputed://gs://neuroglancer-public-data/flyem_fib-25/ground_truth',
)
s.layout = neuroglancer.row_layout([
neuroglancer.LayerGroupViewer(layers=['image', 'ground_truth']),
neuroglancer.LayerGroupViewer(layers=['ground_truth']),
])
print(viewer.state)
print(viewer)
webbrowser.open_new(viewer.get_viewer_url())