Toolbox for viewing, analyzing and correcting (cell) segmentation in 2D, 3D or 4D (t, z, y, x) (virtual) arrays.
This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
You can install napari-segmentation-correction
via pip:
To install latest development version :
pip install git+https://github.com/AnniekStok/napari-segmentation-correction.git
This plugin serves as a toolbox aiming to help with correcting segmentation results. Functionalities:
- Orthogonal views for 3D data based on the MultipleViewerWidget and 3D plane and clipping plane sliders.
- explore label properties (scikit-image regionprops) in a table widget (based on napari-skimage-regionprops) and a Matplotlib plot.
- select/delete labels using a points layer
- copy labels from a 2-5 dimensional array with multiple segmentation options to your current 2-4 dimensional label layer.
- label connected components (scikit-image)
- filter labels by number of pixels
- smooth labels (using a median filter)
- erode/dilate labels (scipy.ndimage and scikit-image)
- binarize an image or labels layer by applying an intensity threshold
- image calculator for mathematical operations on two images
- selecting/deleting labels that overlap with a binary mask
To copy 2D or 3D labels from one layer to another, follow these steps:
- Select the labels layer from which you want to copy, and click 'Convert current label layer to label options layer'
- Make sure the labels layer to which you want to copy is your new current label layer (clicking on it will activate it, or select it from the dropdown at the top of the Editing tab).
- With the layer named 'labels options' selected, Shift+Click on the main view or any of the orthogonal views to copy the label you clicked on to the target layer. Alternatively, right-mouse click will copy only the 2D label from the current view (yx for the main view, xz and yz for the orthogonal views) to the corresponding position in target layer.
All labels that share any pixel overlap with the mask are selected.
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.
Distributed under the terms of the BSD-3 license, "napari-segmentation-correction" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.