fafbseg.flywire.encode_url#

fafbseg.flywire.encode_url(segments=None, annotations=None, coords=None, skeletons=None, seg_colors=None, seg_groups=None, invis_segs=None, scene=None, base_neuroglancer=False, layout='3d', open=False, to_clipboard=False, shorten=True, *, dataset=None)[source]#

Encode data as FlyWire neuroglancer scene.

Parameters:
  • segments (int | list of int | NeuronCriteria, optional) – Segment IDs to have selected.

  • annotations ((N, 3) array or dict of {name: (N, 3) array}, optional) – Array or dict of xyz coordinates that will be added as annotation layer(s). Should be in voxel coordinates. If you need more control over this, see fafbseg.flywire.add_annotation_layer().

  • coords ((3, ) array, optional) – (X, Y, Z) voxel coordinates to center on.

  • skeletons (navis.TreeNeuron | navis.CatmaidNeuron | NeuronList) – Skeleton(s) to add as annotation layer(s).

  • seg_colors (str | tuple | list | dict, optional) – Single color (name or RGB tuple), or list or dictionary mapping colors to segments. Can also be a numpy array of labels which will be automatically turned into colors.

  • seg_groups (list | dict, optional) – List or dictionary mapping segments to groups. Each group will get its own annotation layer.

  • invis_segs (int | list, optional) – Selected but invisible segments.

  • scene (dict | str, optional) – If you want to edit an existing scene, provide it either as already decoded dictionary or as string that can be interpreted by fafbseg.flywire.decode_url().

  • open (bool) – If True, will open the url in a new tab of your webbrowser. By default, we will first try to open in Google Chrome and failing that fall back to your default browser.

  • to_clipboard (bool) – If True, will copy URL to clipboard.

  • shorten (bool) – If True, will make a shortened URL.

  • base_neuroglancer (bool) – Whether to use the base neuroglancer instead of the modified FlyWire neuroglancer.

  • layout ("3d" | "xy-3d" | "xy") – Layout to show.

  • dataset ("public" | "production" | "sandbox" | "flat_630", optional) – Against which FlyWire dataset to query. If None will fall back to the default dataset (see set_default_dataset()).

Returns:

url

Return type:

str