megafish.view module

make_pyramid(zarr_path, group, level=None)[source]

Generates a pyramid of downsampled image data from a zarr dataset and writes it back to zarr storage.

Parameters:
  • zarr_path (str) – The path to the zarr storage.

  • group (str) – The zarr group path containing the image data to be downsampled.

  • level (int, optional) – The specific downsampling level to create. If not specified, all downsampling levels will be generated.

Returns:

None. The function writes the downsampled data directly into the zarr storage at each level.

Notes

  • The downsampling is performed by reducing the size of the yx-dimensions by half in each level.

  • Chunking and shape of the input data are considered to ensure proper processing and output.

mask_edge(zarr_path, group, radius, dtype='uint8', footer='_edg')[source]

Creates an edge mask around binary regions in an image using dilation and erosion.

Parameters:
  • zarr_path (str) – The path to the Zarr file containing the image data.

  • group (str) – The Zarr group name where the image data is located.

  • radius (int) – The radius of the dilation disk for creating the edge mask.

  • dtype (str, optional) – The data type for the output mask. Defaults to “uint8”.

  • footer (str, optional) – The suffix for the output Zarr group name. Defaults to “_edg”.

Returns:

None. This function saves the edge mask data directly to the Zarr file.

max_filter(zarr_path, group_name, radius, axes, footer='_max')[source]