motile_tracker.example_data

Attributes

logger

Functions

Mouse_Embryo_Membrane(→ list[napari.types.LayerData])

Loads the Mouse Embryo Membrane raw data and segmentation data from

Fluo_N2DL_HeLa(→ list[napari.types.LayerData])

Loads the Fluo-N2DL-HeLa 01 training raw data and silver truth from

Fluo_N2DL_HeLa_crop(→ list[napari.types.LayerData])

Loads the Fluo-N2DL-HeLa 01 training raw data and silver truth from

read_zenodo_dataset(→ list[napari.types.LayerData])

Read a zenodo dataset (assumes pre-downloaded)

read_ctc_dataset(→ list[napari.types.LayerData])

Read a CTC dataset from a zarr (assumes pre-downloaded and converted)

download_zenodo_dataset(→ None)

Download a sample dataset from zenodo doi and unzip it, then delete the zip. Then convert the tiffs to

download_ctc_dataset(→ None)

Download a dataset from the Cell Tracking Challenge

convert_4d_arr_to_zarr(→ None)

Convert 4D tiff file to zarr array. Deletes the tiff after conversion.

convert_to_zarr(→ None)

Convert a directory of tiff files to a zarr array. Deletes tiffs after conversion.

Module Contents

motile_tracker.example_data.logger
motile_tracker.example_data.Mouse_Embryo_Membrane() list[napari.types.LayerData]

Loads the Mouse Embryo Membrane raw data and segmentation data from the appdir “user data dir”. Will download it from the Zenodo DOI if not present.

Returns:

An image layer of raw data and a segmentation labels

layer

Return type:

list[LayerData]

motile_tracker.example_data.Fluo_N2DL_HeLa() list[napari.types.LayerData]

Loads the Fluo-N2DL-HeLa 01 training raw data and silver truth from the appdir “user data dir”. Will download it from the CTC and convert it to zarr if it is not present already.

Returns:

An image layer of 01 training raw data and a labels

layer of 01 training silver truth labels

Return type:

list[LayerData]

motile_tracker.example_data.Fluo_N2DL_HeLa_crop() list[napari.types.LayerData]

Loads the Fluo-N2DL-HeLa 01 training raw data and silver truth from the appdir “user data dir”. Will download it from the CTC and convert it to zarr if it is not present already.

Returns:

An image layer of 01 training raw data and a labels

layer of 01 training silver truth labels

Return type:

list[LayerData]

motile_tracker.example_data.read_zenodo_dataset(ds_name: str, raw_name: str, label_name: str, data_dir: pathlib.Path) list[napari.types.LayerData]

Read a zenodo dataset (assumes pre-downloaded) and returns a list of layer data for making napari layers

Parameters:
  • ds_name (str) – name to give to the dataset

  • raw_name (str) – name of the file that points to the intensity data

  • label_name (str) – name of the file that points to the segmentation data

  • data_dir (Path) – Path to the directory containing the images

Returns:

An image layer of raw data and a segmentation labels

layer

Return type:

list[LayerData]

motile_tracker.example_data.read_ctc_dataset(ds_name: str, data_dir: pathlib.Path, crop_region=False) list[napari.types.LayerData]

Read a CTC dataset from a zarr (assumes pre-downloaded and converted) and returns a list of layer data for making napari layers

Parameters:
  • ds_name (str) – Dataset name

  • data_dir (Path) – Path to the directory containing the zarr

Returns:

An image layer of 01 training raw data and a labels

layer of 01 training silver truth labels

Return type:

list[LayerData]

motile_tracker.example_data.download_zenodo_dataset(ds_name: str, raw_name: str, label_name: str, data_dir: pathlib.Path) None

Download a sample dataset from zenodo doi and unzip it, then delete the zip. Then convert the tiffs to zarrs for the first training set consisting of 3D membrane intensity images and segmentation.

Parameters:
  • ds_name (str) – Name to give to the dataset

  • raw_name (str) – Name of the file that contains the intensity data

  • label_name (str) – Name of the file that contains the label data

  • data_dir (Path) – The directory in which to store the data.

motile_tracker.example_data.download_ctc_dataset(ds_name: str, data_dir: pathlib.Path) None

Download a dataset from the Cell Tracking Challenge and unzip it, then delete the zip. Then convert the tiffs to zarrs for the first training set images and silver truth.

Parameters:
  • ds_name (str) – Dataset name, according to the CTC

  • data_dir (Path) – The directory in which to store the data.

motile_tracker.example_data.convert_4d_arr_to_zarr(tiff_file: pathlib.Path, zarr_path: pathlib.Path, zarr_group: str, relabel: bool = False) None

Convert 4D tiff file to zarr array. Deletes the tiff after conversion.

Parameters:
  • tiff_file – Path to the 4D tiff file

  • zarr_path – Path to the zarr store to write to

  • zarr_group – Name of the array within the zarr store

  • relabel – If True, relabel segmentations to be unique across time

motile_tracker.example_data.convert_to_zarr(tiff_path: pathlib.Path, zarr_path: pathlib.Path, zarr_group: str, relabel: bool = False) None

Convert a directory of tiff files to a zarr array. Deletes tiffs after conversion.

Parameters:
  • tiff_path – Path to directory containing tiff files (one per time point)

  • zarr_path – Path to the zarr store to write to

  • zarr_group – Name of the array within the zarr store

  • relabel – If True, relabel segmentations to be unique across time