fafbseg.flywire.get_segmentation_cutout#

fafbseg.flywire.get_segmentation_cutout(bbox, root_ids=True, mip=0, coordinates='voxel', *, dataset=None)[source]#

Fetch cutout of segmentation.

Parameters:
  • bbox (array-like) –

    Bounding box for the cutout:

    [[xmin, xmax], [ymin, ymax], [zmin, zmax]]
    

  • root_ids (bool) – If True, will return root IDs. If False, will return supervoxel IDs. Ignored if dataset is “flat_630”.

  • coordinates ("voxel" | "nm") – Units in which your coordinates are in. “voxel” is assumed to be 4x4x40 (x/y/z) nanometers.

  • 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:

  • cutout (np.ndarry) – (N, M) array of segmentation (root or supervoxel) IDs.

  • resolution ((3, ) numpy array) – [x, y, z] resolution of voxel in cutout.

  • nm_offset ((3, ) numpy array) – [x, y, z] offset in nanometers of the cutout with respect to the absolute coordinates.