{"name":"napari-filter-labels-by-prop","display_name":"Filter labels by properties","visibility":"public","icon":"","categories":["Annotation","Segmentation"],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-filter-labels-by-prop._filter_by_widget","title":"Filter labels by property","python_name":"napari_filter_labels_by_prop._filter_by_widget:FilterByWidget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-filter-labels-by-prop._filter_by_widget","display_name":"Filter labels by properties","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.2","name":"napari-filter-labels-by-prop","version":"0.1.0","dynamic":null,"platform":null,"supported_platform":null,"summary":"A simple plugin to filter labels by properites.","description":"# napari-filter-labels-by-prop\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-filter-labels-by-prop.svg?color=green)](https://github.com/loicsauteur/napari-filter-labels-by-prop/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-filter-labels-by-prop.svg?color=green)](https://pypi.org/project/napari-filter-labels-by-prop)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-filter-labels-by-prop.svg?color=green)](https://python.org)\n[![tests](https://github.com/loicsauteur/napari-filter-labels-by-prop/workflows/tests/badge.svg)](https://github.com/loicsauteur/napari-filter-labels-by-prop/actions)\n[![codecov](https://codecov.io/gh/loicsauteur/napari-filter-labels-by-prop/branch/main/graph/badge.svg)](https://codecov.io/gh/loicsauteur/napari-filter-labels-by-prop)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-filter-labels-by-prop)](https://napari-hub.org/plugins/napari-filter-labels-by-prop)\n\nA simple plugin to filter labels by properties.\n\n----------------------------------\n\nThis [napari] plugin was generated with [copier] using the [napari-plugin-template].\n\n<!--\nDon't miss the full getting started guide to set up your new package:\nhttps://github.com/napari/napari-plugin-template#getting-started\n\nand review the napari docs for plugin developers:\nhttps://napari.org/stable/plugins/index.html\n-->\n## Description\n\nThis plugin provides the possibility to filter segmentation objects by measurements\n(shape and intensity). E.g. you segmented your cells, and you want to exclude segmentation objects\nthat have a mean intensity below a certain value.\n\nIt is intended for 2D and 3D images.\n\nYou can interactively set minimum and maximum thresholds on measurement properties, and\nnapari will show a preview of the selection.\n\nMeasurements are based on `scikit-image regionprops`. However, not all properties are\nimplemented, and they are more restricted for 3D images.\n\n## Usage: Quick start\n\n![](https://github.com/loicsauteur/napari-filter-labels-by-prop/raw/main/resources/preview_filter_labels.gif)\n\n1. Start napari\n2. Start the plugin from the menu: `Plugins > Filter labels by properties`\n3. Add a label image\n4. (optionally) Add a corresponding intensity image with the same (Z)YX shape\n5. In the widget, select the property you want to filter on\n6. Adjust the min/max sliders\n7. When you are ready to create a new label layer click the `Create labels` button in the widget\n\n### Usage notes:\n\nWhen dealing with more than 100 label objects in an image, the filtering view update is\ntriggered only once you release the sliders.\n\nAnother similar plugin you could consider checking out:\n[napari-skimage-regionprops](https://www.napari-hub.org/plugins/napari-skimage-regionprops).\n\nPixel/Voxel size are read from the napari layer scale attribute (defaults to 1 if not specified when adding the layer).\nYou can manually enter the size and press the `Set` button, which will set the layer scale,\nand measure the shape properties with calibrated units\n\nThe \"Measure projected shape properties\" option is only available for 3D images.\nIt measures additional properties of Z-projected labels (including: \"area\", \"convex_area\", \"circularity\" and \"perimeter\").\n\nThe \"Measure cytoplasm and cell compartments\" is intended for label images that represent nuclei.\nWith this option selected, cytoplasm and cell masks will be created by a dilation of 5 units (pixels or calibrated).\nMeasurement in those compartments will be made and be used to filter on.\n`Create labels` will also add the respective cytoplasm and cell mask layers to the napari viewer.\n\n<!--\n         ## TODO: add feature measurement also to layer.features?\n-->\n## Installation\n\nYou can install `napari-filter-labels-by-prop` via [pip]:\n\n    pip install napari-filter-labels-by-prop\n\n\nTo install latest development version :\n\n    pip install git+https://github.com/loicsauteur/napari-filter-labels-by-prop.git\n\n<!--\nInstall Test dependencies\n    `pip install -e \".[testing]\"`\n-->\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-filter-labels-by-prop\" is free and open source software\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[copier]: https://copier.readthedocs.io/en/stable/\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[napari-plugin-template]: https://github.com/napari/napari-plugin-template\n\n[file an issue]: https://github.com/loicsauteur/napari-filter-labels-by-prop/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","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"Loïc Sauteur","author_email":"loic.sauteur@unibas.ch","maintainer":null,"maintainer_email":null,"license":"Copyright (c) 2025, Loïc Sauteur\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of copyright holder nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy","magicgui","qtpy","scikit-image","matplotlib","tox; extra == \"testing\"","pytest; extra == \"testing\"","pytest-cov; extra == \"testing\"","pytest-qt; extra == \"testing\"","napari; extra == \"testing\"","pyqt5; extra == \"testing\""],"requires_python":">=3.9","requires_external":null,"project_url":["Bug Tracker, https://github.com/loicsauteur/napari-filter-labels-by-prop/issues","Documentation, https://github.com/loicsauteur/napari-filter-labels-by-prop#README.md","Source Code, https://github.com/loicsauteur/napari-filter-labels-by-prop","User Support, https://github.com/loicsauteur/napari-filter-labels-by-prop/issues"],"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}