State Utilities#
Basic convenience functions for downloading and parsing neuroglancer states.
- ngsidekick.state_utils.parse_nglink(link)[source]#
Given a neuroglancer link, return the corresponding JSON state.
- Arg:
- link: str
A neuroglancer link such as: https://neuroglancer-demo.appspot.com/#!gs://flyem-male-cns/v0.9/male-cns-v0.9.json
Also works with fully expanded neuroglancer links.
- Returns:
dict
- ngsidekick.state_utils.download_ngstate(link)[source]#
Given a neuroglancer link which references a JSON state file, download the file and return the enclosed JSON data.
- Arg:
- link: str
A neuroglancer link such as: https://neuroglancer-demo.appspot.com/#!gs://flyem-male-cns/v0.9/male-cns-v0.9.json
- Returns:
dict
- ngsidekick.state_utils.encode_ngstate(ng_server, link_json_settings)[source]#
Produce a fully expanded URL from a neuroglancer server and a JSON state.