{"id":19102236,"url":"https://github.com/haesleinhuepf/napari-simpleitk-image-processing","last_synced_at":"2025-09-16T20:29:38.966Z","repository":{"id":39659254,"uuid":"432729955","full_name":"haesleinhuepf/napari-simpleitk-image-processing","owner":"haesleinhuepf","description":"Process images using SimpleITK in napari","archived":false,"fork":false,"pushed_at":"2025-05-01T17:49:11.000Z","size":8911,"stargazers_count":21,"open_issues_count":9,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-04T15:45:59.958Z","etag":null,"topics":["napari-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haesleinhuepf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-28T14:08:42.000Z","updated_at":"2025-05-05T10:02:48.000Z","dependencies_parsed_at":"2024-09-05T16:54:18.868Z","dependency_job_id":"17285415-87af-41ab-a04d-e23ae96502d4","html_url":"https://github.com/haesleinhuepf/napari-simpleitk-image-processing","commit_stats":{"total_commits":100,"total_committers":2,"mean_commits":50.0,"dds":"0.020000000000000018","last_synced_commit":"83ae92fb2212b1b2aa225e3c6fb2ca414b1b8258"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/haesleinhuepf/napari-simpleitk-image-processing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-simpleitk-image-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-simpleitk-image-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-simpleitk-image-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-simpleitk-image-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haesleinhuepf","download_url":"https://codeload.github.com/haesleinhuepf/napari-simpleitk-image-processing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-simpleitk-image-processing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268290751,"owners_count":24226646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["napari-plugin"],"created_at":"2024-11-09T03:54:28.692Z","updated_at":"2025-09-16T20:29:33.878Z","avatar_url":"https://github.com/haesleinhuepf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# napari-simpleitk-image-processing (n-SimpleITK)\n\n[![License](https://img.shields.io/pypi/l/napari-simpleitk-image-processing.svg?color=green)](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-simpleitk-image-processing.svg?color=green)](https://pypi.org/project/napari-simpleitk-image-processing)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-simpleitk-image-processing.svg?color=green)](https://python.org)\n[![tests](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/workflows/tests/badge.svg)](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/actions)\n[![codecov](https://codecov.io/gh/haesleinhuepf/napari-simpleitk-image-processing/branch/main/graph/badge.svg)](https://codecov.io/gh/haesleinhuepf/napari-simpleitk-image-processing)\n[![Development Status](https://img.shields.io/pypi/status/napari-simpleitk-image-processing.svg)](https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-simpleitk-image-processing)](https://napari-hub.org/plugins/napari-simpleitk-image-processing)\n[![DOI](https://zenodo.org/badge/432729955.svg)](https://zenodo.org/badge/latestdoi/432729955)\n\nProcess images using [SimpleITK](https://simpleitk.org/) in [napari]\n\n## Usage\n\nFilters, segmentation algorithms and measurements provided by this napari plugin can be found in the `Tools` menu. \nYou can recognize them with their suffix `(n-SimpleITK)` in brackets.\nFurthermore, it can be used from the [napari-assistant](https://www.napari-hub.org/plugins/napari-assistant) graphical user interface. \nTherefore, just click the menu `Tools \u003e Utilities \u003e Assistant (na)` or run `naparia` from the command line.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/screenshot_with_assistant.png)\n\nAll filters implemented in this napari plugin are also demonstrated in [this notebook](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/blob/main/docs/demo.ipynb).\n\n### Gaussian blur\n\nApplies a [Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur)\nto an image. This might be useful for denoising, e.g. before applying the Threshold-Otsu method.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/gaussian_blur.png)\n\n### Median filter\n\nApplies a [median filter](https://en.wikipedia.org/wiki/Median_filter) to an image. \nCompared to the Gaussian blur this method preserves edges in the image better. \nIt also performs slower.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/median_filter.png)\n\n### Bilateral filter\n\nThe [bilateral filter](https://en.wikipedia.org/wiki/Bilateral_filter) allows denoising an image\nwhile preserving edges.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/bilateral.png)\n\n### Threshold Otsu\n\nBinarizes an image using [Otsu's method](https://ieeexplore.ieee.org/document/4310076).\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/threshold_otsu.png)\n\n### Connected Component Labeling\n\nTakes a binary image and labels all objects with individual numbers to produce a label image.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/connected_component_labeling.png)\n\n### Measurements\n\nThis function allows determining intensity and shape statistics from labeled images. I can be found in the `Tools \u003e Measurement tables` menu.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/measurements.png)\n\n### Signed Maurer distance map\n\nA distance map (more precise: [Signed Maurer Distance Map](https://itk.org/ITKExamples/src/Filtering/DistanceMap/MaurerDistanceMapOfBinary/Documentation.html)) can be useful for visualizing distances within binary images between black/white borders. \nPositive values in this image correspond to a white (value=1) pixel's distance to the next black pixel.\nBlack pixel's (value=0) distance to the next white pixel are represented in this map with negative values.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/signed_maured_distance_map.png)\n\n### Binary fill holes\n\nFills holes in a binary image.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/binary_fill_holes.png)\n\n### Touching objects labeling\n\nStarting from a binary image, touching objects can be splits into multiple regions, similar to the [Watershed segmentation in ImageJ](https://imagej.net/plugins/classic-watershed).\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/Touching_object_labeling.png)\n\n### Morphological Watershed\n\nThe [morhological watershed](http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/32_Watersheds_Segmentation.html)\nallows to segment images showing membranes. Before segmentation, a filter such as the Gaussian blur or a median filter\nshould be used to eliminate noise. It also makes sense to increase the thickness of membranes using a maximum filter. \nSee [this notebook](https://github.com/clEsperanto/pyclesperanto_prototype/blob/master/demo/segmentation/segmentation_2d_membranes.ipynb) for details.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/morphological_watershed.png)\n\n### Watershed-Otsu-Labeling\n\nThis algorithm uses [Otsu's thresholding method](https://ieeexplore.ieee.org/document/4310076) in combination with \n[Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur) and the \n[Watershed-algorithm](https://en.wikipedia.org/wiki/Watershed_(image_processing)) \napproach to label bright objects such as nuclei in an intensity image. The alogrithm has two sigma parameters and a \nlevel parameter which allow you to fine-tune where objects should be cut (`spot_sigma`) and how smooth outlines \nshould be (`outline_sigma`). The `watershed_level` parameter determines how deep an intensity valley between two maxima \nhas to be to differentiate the two maxima. \nThis implementation is similar to [Voronoi-Otsu-Labeling in clesperanto](https://github.com/clEsperanto/pyclesperanto_prototype/blob/master/demo/segmentation/voronoi_otsu_labeling.ipynb).\n\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/watershed_otsu_labeling.png)\n\n### Richardson-Lucy Deconvolution\n\n[Richardson-Lucy deconvolution](https://en.wikipedia.org/wiki/Richardson%E2%80%93Lucy_deconvolution)\nallows to restore image quality if the point-spread-function of the optical system used \nfor acquisition is known or can be approximated.\n\n![img.png](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/docs/Richardson-Lucy-Deconvolution.png)\n\n\n## Installation\n\nYou can install `napari-simpleitk-image-processing` via using `conda` and `pip`.\nIf you have never used `conda` before, please go through [this tutorial](https://biapol.github.io/blog/johannes_mueller/anaconda_getting_started/) first.\n\n    conda install -c conda-forge napari\n    pip install napari-simpleitk-image-processing\n\nNote: This plugin is not compatible with napari 0.6.0 or later.\n\n## Features\n\nThe user can select categories of features for feature extraction in the user interface. These categories contain the following measurements:\n* size:\n    * equivalent_ellipsoid_diameter\n    * equivalent_spherical_perimeter\n    * equivalent_spherical_radius\n    * number_of_pixels\n    * number_of_pixels_on_border\n* intensity:\n   * maximum \n   * mean \n   * median\n   * minimum \n   * sigma\n   * sum\n   * variance\n* perimeter:\n   * perimeter\n   * perimeter_on_border\n   * perimeter_on_border_ratio\n* shape:\n   * elongation\n   * feret_diameter\n   * flatness\n   * roundness\n* position:\n   * centroid \n   * bbox\n* moments:\n   * principal_axes\n   * principal_moments\n\n## See also\n\nThere are other napari plugins with similar functionality for processing images and extracting features:\n* [morphometrics](https://www.napari-hub.org/plugins/morphometrics)\n* [PartSeg](https://www.napari-hub.org/plugins/PartSeg)\n* [napari-skimage-regionprops](https://www.napari-hub.org/plugins/napari-skimage-regionprops)\n* [napari-cupy-image-processing](https://www.napari-hub.org/plugins/napari-cupy-image-processing)\n* [napari-pyclesperanto-assistant](https://www.napari-hub.org/plugins/napari-pyclesperanto-assistant)\n* [napari-allencell-segmenter](https://napari-hub.org/plugins/napari-allencell-segmenter)\n* [RedLionfish](https://www.napari-hub.org/plugins/RedLionfish)\n* [bbii-decon](https://www.napari-hub.org/plugins/bbii-decon)  \n* [napari-segment-blobs-and-things-with-membranes](https://www.napari-hub.org/plugins/napari-segment-blobs-and-things-with-membranes)\n\nFurthermore, there are plugins for postprocessing extracted measurements\n* [napari-feature-classifier](https://www.napari-hub.org/plugins/napari-feature-classifier)\n* [napari-clusters-plotter](https://www.napari-hub.org/plugins/napari-clusters-plotter)\n\n## Contributing\n\nContributions are very welcome. There are many useful algorithms available in \n[SimpleITK](https://simpleitk.org/). If you want another one available here in this napari\nplugin, don't hesitate to send a [pull-request](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/pulls).\nThis repository just holds wrappers for SimpleITK-functions, see [this file](https://github.com/haesleinhuepf/napari-simpleitk-image-processing/raw/main/src/napari_simpleitk_image_processing/_simpleitk_image_processing.py#L51) for how those wrappers\ncan be written.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-simpleitk-image-processing\" is free and open source software\n\n## Citation\n\nFor implementing this napari plugin, the \n[SimpleITK python notebooks](https://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/) were very helpful. \nThus, if you find the plugin useful, consider citing the SimpleITK notebooks:\n\nZ. Yaniv, B. C. Lowekamp, H. J. Johnson, R. Beare, \n\"SimpleITK Image-Analysis Notebooks: a Collaborative Environment for Education and Reproducible Research\", \\\nJ Digit Imaging., 31(3): 290-303, 2018, [https://doi.org/10.1007/s10278-017-0037-8](https://doi.org/10.1007/s10278-017-0037-8).\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n\n[file an issue]: https://github.com/haesleinhuepf/napari-simpleitk-image-processing/issues\n\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaesleinhuepf%2Fnapari-simpleitk-image-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaesleinhuepf%2Fnapari-simpleitk-image-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaesleinhuepf%2Fnapari-simpleitk-image-processing/lists"}