fafbseg.flywire.get_mesh_neuron¶
- fafbseg.flywire.get_mesh_neuron(id, with_synapses=False, omit_failures=None, threads=5, lod=None, progress=True, *, dataset=None)[source]¶
Fetch FlyWire neuron as navis.MeshNeuron.
- Parameters:
id (int | list of int | NeuronCriteria) – Root ID(s) to fetch meshes for.
with_synapses (bool) – If True, will also load a connector table with synapse predicted by Buhmann et al. (2020). This uses the default parameters for
flywire.get_synapses
. Use that function directly (withattach=True
) to have more control over which synapses get pulled.omit_failures (bool, optional) –
Determine behaviour when mesh download fails (e.g. if there is no mesh):
None
(default) will raise an exceptionTrue
will skip the offending neuron (might result in an emptyNeuronList
)False
will return an emptyMeshNeuron
threads (bool | int, optional) – Whether to use threads to fetch meshes in parallel.
lod (int [0-3], optional) – Level-of-detail; higher = lower resolution. Only relevant if dataset is actually has multi-resolution meshes. Defaults to 2. Note that not all meshes are available at the lowest resolution (lod 3). If that happens, we will automatically try to fetch the next lowest one.
dataset (str | CloudVolume) –
- Against which FlyWire dataset to query::
”production” (currently fly_v31)
”public”
”sandbox” (currently fly_v26)
”flat_630” or “flat_571” will use the flat segmentations matching the respective materialization versions. By default these use lod=2, you can change that behaviour by passing lod as keyword argument. If
None
will fall back to the default dataset (seeset_default_dataset()
).
- Return type:
navis.MeshNeuron
Examples
>>> from fafbseg import flywire >>> m = flywire.get_mesh_neuron(720575940614131061) >>> m.plot3d()