fafbseg.google.segments_to_skids#

fafbseg.google.segments_to_skids(seg_ids, autoseg_instance, name_pattern='Google: {id}', merge_annotation_pattern='Merged: {name}', verbose=True)[source]#

Retrieve skeleton IDs of neurons corresponding to 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 this parameter to define that pattern.

  • merge_annotation_pattern (str, optional) – When neurons are merged, a reference to the loosing skeleton’s name is kept as annotation. Use this parameter to define that pattern.

Returns:

Dictionary mapping segmentation ID to skeleton ID. Will be None if no skeleton found.

Return type:

Dict