The napari hub is transitioning to a community-run implementation due to launch in June 2025.
Since October 1, 2024, this version is no longer actively maintained and will not be updated. New plugins and plugin updates will continue to be listed.

Embryo Segmentation

segment-embryo

3D Segment ascidian embryos using cellpose. The images are first rescaled to be isotropic and then downscaled, before cellpose is used. The resulting labels are upscaled to match the original data.

Workflow step:
Image annotation
Image segmentation

License MIT PyPI Python Version tests codecov napari hub

3D Segment ascidian embryos using cellpose. The images are first rescaled to be isotropic and then downscaled, before cellpose is used. The resulting labels are upscaled to match the original data.


This napari plugin was generated with copier using the napari-plugin-template.

Installation

You can install segment-embryo via pip:

pip install segment-embryo

Usage

We will segment the cells of an embryo and count the mRNA spots tagged in another channel per cell.

1. Opening an image

Drag a tif- or czi-file from your file-browser and drop it into the napari window. The image will opened. The napari-plugin napari-czifile2 is used to open czi-files.

2. Checking and modifying the voxel size

Open the plugin Scale-Tool plugin from the Plugins-menu. Make sure the voxel-size values are set correctly in nm. Correct the values and the unit if necessary and press the Apply to all button.

3. Segmenting the cells of the embryo

Close the Scale-Tool plugin and open the Embryo Segmentation-plugin from the Plugins-menu. Select the layer containing the membranes as input image and the layer containing the nuclei as nuclei image. Press the run button and wait until the segmentation is finished. When the segmentation is finished a Labels layer with the result will be added to the layers list.

4. Exporting and curating the labels

If the labels need curation, select the labels layer and save it to a tiff-file via the menu File>Save Selected Layers.... Import the saved labels into the Morphonet 2 standalone client, make the corrrections and export the corrected labels to a tiff-file. Open the tiff-file in napari.

5. Detecting spots

Close the Embryo Segmentation plugin, select the layer containing the mRNA-spots and open the Detect FISH spots-plugin from the Plugins-menu. Estimate the spot size in xy and z in ImageJ and enter the values into the corresponding fields. You can either estimate the threshold let the software find a threshold value. Press the detect spots button. Depending on the result you might want to modify the threshold-value and run the plugin again.

6. Counting Spots per cell

In the Spot Counting section of the plugin, select the spots layer as input and the labels layer for the cytoplasm labels and also for the nuclei labels.

image

Press the Count Spots button! You will obtain a table with the numbers of spots per cell. If you provide the image twice, for the cytoplasm as well as for the nuclei, the spots will all be counted inside the nuclei. If you also want to know per cell how many spots are in the nucleus and how many are in the cytoplasm, you need to provide a mask or label image for the nuclei. You can obtain one by thresholding the nucleus image or by selecting segment nuclei in step 3.

You can copy the data from the table to your spreadsheat software. Activate the table by clicking into it and press ctrl+a to select all rows and columns. Press ctrl+c to copy the data to the clipboard and ctrl+v to paste it into your spreadsheet.

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, "segment-embryo" is free and open source software

Issues

If you encounter any problems, please [file an issue] along with a detailed description.

Version:

  • 0.5

Last updated:

  • 15 January 2025

First released:

  • 27 November 2024

License:

Supported data:

  • Information not submitted

Plugin type:

GitHub activity:

  • Stars: 0
  • Forks: 0
  • Issues + PRs: 0

Python versions supported:

Operating system:

Requirements:

  • numpy
  • magicgui
  • qtpy
  • scikit-image
  • cellpose
  • czifile
  • napari-czifile2
  • set-calibration
  • big-fish
  • napari-bigfish
  • scikit-image