MMV_H4Cells
A simple plugin to help with analyzing cells in napari
This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
Installation
You can install mmv_h4cells via pip:
pip install mmv_h4cells
To install latest development version :
pip install git+https://github.com/MMV-Lab/mmv_h4cells.git
Documentation
This plugin was developed for semi-automatic cell analysis to determine cell sizes of individual cells.
The core functionality includes the option to include or exclude individual (cell) instances in the evaluation via the include/exclude button. After a decision has been made, the plugin automatically centers on the next instance and a new decision can be made. In addition, you can include multiple cells at the same time using the "select multiple" function. It is also possible to analyze entire ROIs at once.
Get started
To get started, an instance segmentation must be loaded. This can be done simply via drag & drop. A raw image of the original data is optional, but certainly helps when deciding whether to include or exclude. Once the layers have been loaded into napari, the plugin can be started. If you have only interrupted the evaluation and exported the previous results, you can now import them again (the segmentation must be reloaded into napari).
Analysis
The analysis can be started by clicking on the "Start analysis" button. The next instance ID to be evaluated is shown next to "Start analysis at". To change the region of interest to be evaluated, a different ID can be entered there and the plugin will center on this within the next 2 decisions. Decisions are made by clicking the Include/Exclude button. If an instance is not completely recognized correctly, you can use the paint function of napari to correct this manually and then include the instance as usual using the button. The undo function can be used to undo the last decision and the "Draw own cell" button allows you to add unrecognized cells manually. This must be done cell by cell and confirmed each time using the button. The plugin does not allow other existing instances to be painted over. If this happens by mistake, a warning is displayed, oberlapping pixels are highlighted and users can either cancel via the cancel button within the warning or close the warning and correct this manually.
When an instance is included, the respective instance is written to a segmentation layer, which can be exported using the export function. In addition, the ID, the size and the centroid are exported as a .csv file. We also export a .zarr file, which makes it possible to re-import previously exported results, for example to pause the analysis. To enable a smooth re-import, the .csv and the .zarr file must have the same name stem, so please either do not rename the files or rename them in the same way.
For a better overview, the included/excluded/remaining instances can be viewed using the buttons at the bottom.
Select multiple cells
We also support the option of including several cells at once. To do so, the respective IDs must be entered at the bottom next to "Include" and then selected using the "Select multiple". This works by entering comma-separated IDs, so 1,5,100,17 would be a valid entry.
Select ROI
Entire ROIs can also be analyzed. To do this, simply enter the corner pixels in the "Range x" and "Range y" fields. All cells > the threshold are included; if, for example, cells that lie exactly at the edge of the ROI and are partially cut off are to be excluded, a corresponding threshold must be set.
Note: Exported ROIs cannot be re-imported.
Hotkeys
k- Includeg- Excludej- Change visibility of all label layers for better inspectionh- Undo
Don'ts
This is a tool for analyzing cells. However, we do not catch every possible error and in order for the tool to run stable, it is important to avoid some operations:
- Do not create new layers during the analysis.
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 BSD-3 license, "mmv_h4cells" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for mmv-h4cells 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mmv_h4cells-1.1.0.tar.gz | 30.7 kB | Without provenance | Details for mmv_h4cells-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mmv_h4cells-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for mmv_h4cells-1.1.0-py3-none-any.whl |
Total release size: 60.0 kB
Release files / mmv_h4cells-1.1.0.tar.gz
| Download URL | mmv_h4cells-1.1.0.tar.gz |
|---|---|
| Size | 30.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd839d7fd2cda6c39a6e970ac2000f0e02f795c09c537111dfed853e43e55a01
|
|
BLAKE2b-256 checksum How to use checksums |
208a33c648fd3a23bcccee111d8c5baab00e1783fd83ed6024e29cf37562aafe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / mmv_h4cells-1.1.0-py3-none-any.whl
| Download URL | mmv_h4cells-1.1.0-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4067526d61c1e65e680091444ff149dd7c00efc1ba3c69f7dfe834982572b46f
|
|
BLAKE2b-256 checksum How to use checksums |
e0d3fcd0e180c0a078f0e7cfcf0f974aaf815c7aa4881dd39cf9a0ee96e6ae1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for mmv-h4cells 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.