spatialdata.get_pyramid_levels

spatialdata.get_pyramid_levels#

spatialdata.get_pyramid_levels(image, attr=None, n=None)#

Access the data/attribute of the pyramid levels of a multiscale spatial image.

Parameters:
  • image (DataTree) – The multiscale spatial image.

  • attr (Optional[str] (default: None)) – If None, return the data of the pyramid level as a DataArray, if not None, return the specified attribute within the DataArray data.

  • n (Optional[int] (default: None)) – If not None, return only the n pyramid level.

Return type:

Union[list[Any], Any]

Returns:

: The pyramid levels data (or an attribute of it) as a list or a generator.