fafbseg.google.segments_to_neuron

fafbseg.google.segments_to_neuron(seg_ids, autoseg_instance, name_pattern='Google: {id}', verbose=True, raise_none_found=True)[source]

Retrieve autoseg neurons of given segmentation ID(s).

If a given segmentation ID has been merged into another fragment, will try retrieving by annotation.

Parameters
  • seg_ids (int | list of int) – Segmentation ID(s) of autoseg skeletons to retrieve.

  • autoseg_instance (pymaid.CatmaidInstance) – Instance with autoseg skeletons.

  • name_pattern (str, optional) – Segmentation IDs are encoded in the name. Use parameter this to define that pattern.

  • raise_none_found (bool, optional) – If True and none of the requested segments were found, will raise ValueError

Returns

Neurons representing given segmentation IDs. Each neuron has the list of segmentation IDs associated with it as .seg_ids attribute.

Return type

CatmaidNeuronList