cellmap_flow.viewer.bootstrap
A new viewer on a dataset: new_viewer().
The viewers the dashboard serves are made here: the CLIs’ startup viewer
(dashboard.services.startup.generate_neuroglancer_url), cellmap_flow view’s
(cli/viewer_cli.py), /api/set-data, and the bounding-box tool. It never
starts the dashboard. viewer_url() is the address a browser is given for
any of them.
Attributes
Functions
|
A viewer's coordinate space over axes |
|
The viewer's dimensions for |
|
A viewer showing the raw data at |
|
The address to give a browser for |
Module Contents
- cellmap_flow.viewer.bootstrap.logger
- cellmap_flow.viewer.bootstrap.GPU_MEMORY_LIMIT = 2000000000
- cellmap_flow.viewer.bootstrap.viewer_space(names, scales)
A viewer’s coordinate space over axes
namesatscalesnm, put in VIEWER_AXES order (x, y, z, then any others) when it has all three.
- cellmap_flow.viewer.bootstrap.raw_dimensions(dataset_path)
The viewer’s dimensions for
dataset_path: the axes and voxel size (nm) of the finest level of the pyramid it belongs to – the group, one of its levels or a precomputed volume (wa.open_pyramid), the array itself when it is in none – x, y, z (viewer_space).Set before any layer is added, so that the raw data decides the viewer’s coordinate space rather than whichever layer neuroglancer takes it from, such as an extra layer at another voxel size. None if it cannot be read.
- cellmap_flow.viewer.bootstrap.new_viewer(dataset_path, *, scales=None, raw=None, raw_name='data', layers=None)
A viewer showing the raw data at
dataset_path, thenlayers.scales: the viewer’s voxel size, z, y, x in nm. None takes it from the raw (raw_dimensions), or leaves the dimensions to neuroglancer if it cannot be read. Either way the dimensions are x, y, z (viewer_space).raw: the raw data’s layer, if the caller built it (raw_layer); shown asraw_name.layers:{name: layer}, added after the raw in their order.
Its server binds every interface: the browser is rarely on the machine the viewer runs on.
- cellmap_flow.viewer.bootstrap.viewer_url(viewer)
The address to give a browser for
viewer: neuroglancer’s own, with this machine’s IP address (this_machine_ip) in place of its name.Neuroglancer names a server that binds every interface, as new_viewer’s does, by the machine’s DNS name. Off campus, a laptop’s name still pointed at its campus address, and the viewer never loaded. A server named by an address or as localhost is bound to that alone, and is left as it is, as is anything without a host.