napari-skimage-regionprops


Namenapari-skimage-regionprops JSON
Version 0.10.1 PyPI version JSON
download
home_pagehttps://github.com/haesleinhuepf/napari-skimage-regionprops
SummaryA regionprops table widget plugin for napari
upload_time2023-05-19 16:47:39
maintainer
docs_urlNone
authorMarcelo Zoccoler, Robert Haase
requires_python>=3.8
licenseBSD-3
keywords
VCS
bugtrack_url
requirements napari-plugin-engine numpy scikit-image napari pandas napari-tools-menu napari-workflows imageio Deprecated
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # napari-skimage-regionprops (nsr)



[![License](https://img.shields.io/pypi/l/napari-skimage-regionprops.svg?color=green)](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/LICENSE)

[![PyPI](https://img.shields.io/pypi/v/napari-skimage-regionprops.svg?color=green)](https://pypi.org/project/napari-skimage-regionprops)

[![Python Version](https://img.shields.io/pypi/pyversions/napari-skimage-regionprops.svg?color=green)](https://python.org)

[![tests](https://github.com/haesleinhuepf/napari-skimage-regionprops/workflows/tests/badge.svg)](https://github.com/haesleinhuepf/napari-skimage-regionprops/actions)

[![codecov](https://codecov.io/gh/haesleinhuepf/napari-skimage-regionprops/branch/master/graph/badge.svg)](https://codecov.io/gh/haesleinhuepf/napari-skimage-regionprops)

[![Development Status](https://img.shields.io/pypi/status/napari-skimage-regionprops.svg)](https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha)

[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-skimage-regionprops)](https://napari-hub.org/plugins/napari-skimage-regionprops)



 

A [napari] plugin for measuring properties of labeled objects based on [scikit-image]



![](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/interactive.gif)



## Usage: measure region properties



From the menu `Tools > Measurement > Regionprops (nsr)` you can open a dialog where you can choose an intensity image, a corresponding label image and the features you want to measure:



![img.png](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/dialog.png)



If you want to interface with the labels and see which table row corresponds to which labeled object, use the label picker and

activate the `show selected` checkbox.



![](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/interactive.png)



If you closed a table and want to reopen it, you can use the menu `Tools > Measurements > Show table (nsr)` to reopen it. 

You just need to select the labels layer the properties are associated with.



For visualizing measurements with different grey values, as parametric images, you can double-click table headers.



![img.png](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/label_value_visualization.gif)



## Usage: measure point intensities



Analogously, also the intensity and coordinates of point layers can be measured using the menu `Tools > Measurement > Measure intensity at point coordinates (nsr)`. 

Also these measurements can be visualized by double-clicking table headers:



![img.png](measure_point_intensity.png)



![img_1.png](measure_point_coordinate.png)



## Working with time-lapse and tracking data



Note that tables for time-lapse data should include a column named "frame", which indicates which slice in

time the given row refers to. If you want to import your own csv files for time-lapse data make sure to include this column.

If you have tracking data where each column specifies measurements for a track instead of a label at a specific time point,

this column must not be added.



In case you have 2D time-lapse data you need to convert it into a suitable shape using the function: `Tools > Utilities > Convert 3D stack to 2D time-lapse (time-slicer)`,

which can be found in the [napari time slicer](https://www.napari-hub.org/plugins/napari-time-slicer).



Last but not least, make sure that in case of time-lapse data the label image has labels that are subsquently labeled per timepoint.

E.g. a dataset where label 5 is missing at timepoint 4 may be visualized incorrectly.



## Usage: multichannel or multi-label data



If you want to relate objects from one channels to objects from another channel, you can use `Tools > Measurement tables > Object Features/Properties (scikit-image, nsr)`. 

This plugin module allos you to answer questions like:

  - how many objects I have inside other objects?

  - what is the average intensity of the objects inside other objects?

For that, you need at least two labeled images in napari. You can relate objects along with their features. 

If intensity features are also wanted, then you also need to provide two intensity images. 

Below, there is a small example on how to use it. 

Also, take a look at [this example notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/measure_relationship_to_other_channels_plugin.ipynb).

 

 ![](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/things_inside_things_demo.gif)



## Usage, programmatically



You can also control the tables programmatically. See this 

[example notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/tables.ipynb) for details on regionprops and

[this example notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/measure_points.ipynb) for details on measuring intensity at point coordinates. For creating parametric map images, see [this notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/map_measurements.ipynb).





## Features

The user can select categories of features for feature extraction in the user interface. These categories contain measurements from the scikit-image [regionprops list of measurements](https://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops) library:

* size:

  * area

  * bbox_area

  * convex_area

  * equivalent_diameter

* intensity:

  * max_intensity 

  * mean_intensity

  * min_intensity

  * standard_deviation_intensity (`extra_properties` implementation using numpy)

* perimeter:

  * perimeter

  * perimeter_crofton

* shape

  * major_axis_length

  * minor_axis_length

  * orientation

  * solidity

  * eccentricity

  * extent

  * feret_diameter_max

  * local_centroid

  * roundness as defined for 2D labels [by ImageJ](https://imagej.nih.gov/ij/docs/menus/analyze.html#set)

  * circularity as defined for 2D labels  [by ImageJ](https://imagej.nih.gov/ij/docs/menus/analyze.html#set)

  * aspect_ratio as defined for 2D labels [by ImageJ](https://imagej.nih.gov/ij/docs/menus/analyze.html#set)

* position:

  * centroid

  * bbox

  * weighted_centroid

* moments:

  * moments

  * moments_central

  * moments_hu

  * moments_normalized



 



This [napari] plugin was generated with [Cookiecutter] using with [@napari]'s [cookiecutter-napari-plugin] template.



## See also



There are other napari plugins with similar functionality for extracting features:

* [morphometrics](https://www.napari-hub.org/plugins/morphometrics)

* [PartSeg](https://www.napari-hub.org/plugins/PartSeg)

* [napari-simpleitk-image-processing](https://www.napari-hub.org/plugins/napari-simpleitk-image-processing)

* [napari-cupy-image-processing](https://www.napari-hub.org/plugins/napari-cupy-image-processing)

* [napari-pyclesperanto-assistant](https://www.napari-hub.org/plugins/napari-pyclesperanto-assistant)



Furthermore, there are plugins for postprocessing extracted measurements

* [napari-feature-classifier](https://www.napari-hub.org/plugins/napari-feature-classifier)

* [napari-clusters-plotter](https://www.napari-hub.org/plugins/napari-clusters-plotter)

* [napari-accelerated-pixel-and-object-classification](https://www.napari-hub.org/plugins/napari-accelerated-pixel-and-object-classification)



## Installation



You can install `napari-skimage-regionprops` via [pip]:



    pip install napari-skimage-regionprops



Or if you plan to develop it:



    git clone https://github.com/haesleinhuepf/napari-skimage-regionprops

    cd napari-skimage-regionprops

    pip install -e .



If there is an error message suggesting that git is not installed, run `conda install git`.



## 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,

"napari-skimage-regionprops" is free and open source software



## Issues



If you encounter any problems, please create a thread on [image.sc] along with a detailed description and tag [@haesleinhuepf].



[napari]: https://github.com/napari/napari

[Cookiecutter]: https://github.com/audreyr/cookiecutter

[@napari]: https://github.com/napari

[BSD-3]: http://opensource.org/licenses/BSD-3-Clause

[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin

[image.sc]: https://image.sc

[napari]: https://github.com/napari/napari

[tox]: https://tox.readthedocs.io/en/latest/

[pip]: https://pypi.org/project/pip/

[PyPI]: https://pypi.org/

[scikit-image]: https://scikit-image.org/

[@haesleinhuepf]: https://twitter.com/haesleinhuepf


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/haesleinhuepf/napari-skimage-regionprops",
    "name": "napari-skimage-regionprops",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Marcelo Zoccoler, Robert Haase",
    "author_email": "robert.haase@tu-dresden.de",
    "download_url": "https://files.pythonhosted.org/packages/01/68/b016a3a76e631bbf0b74104f0c073e1d5065a71ab4476a370e52e153450a/napari-skimage-regionprops-0.10.1.tar.gz",
    "platform": null,
    "description": "# napari-skimage-regionprops (nsr)\r\n\r\n\r\n\r\n[![License](https://img.shields.io/pypi/l/napari-skimage-regionprops.svg?color=green)](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/LICENSE)\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/napari-skimage-regionprops.svg?color=green)](https://pypi.org/project/napari-skimage-regionprops)\r\n\r\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-skimage-regionprops.svg?color=green)](https://python.org)\r\n\r\n[![tests](https://github.com/haesleinhuepf/napari-skimage-regionprops/workflows/tests/badge.svg)](https://github.com/haesleinhuepf/napari-skimage-regionprops/actions)\r\n\r\n[![codecov](https://codecov.io/gh/haesleinhuepf/napari-skimage-regionprops/branch/master/graph/badge.svg)](https://codecov.io/gh/haesleinhuepf/napari-skimage-regionprops)\r\n\r\n[![Development Status](https://img.shields.io/pypi/status/napari-skimage-regionprops.svg)](https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha)\r\n\r\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-skimage-regionprops)](https://napari-hub.org/plugins/napari-skimage-regionprops)\r\n\r\n\r\n\r\n \r\n\r\nA [napari] plugin for measuring properties of labeled objects based on [scikit-image]\r\n\r\n\r\n\r\n![](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/interactive.gif)\r\n\r\n\r\n\r\n## Usage: measure region properties\r\n\r\n\r\n\r\nFrom the menu `Tools > Measurement > Regionprops (nsr)` you can open a dialog where you can choose an intensity image, a corresponding label image and the features you want to measure:\r\n\r\n\r\n\r\n![img.png](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/dialog.png)\r\n\r\n\r\n\r\nIf you want to interface with the labels and see which table row corresponds to which labeled object, use the label picker and\r\n\r\nactivate the `show selected` checkbox.\r\n\r\n\r\n\r\n![](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/interactive.png)\r\n\r\n\r\n\r\nIf you closed a table and want to reopen it, you can use the menu `Tools > Measurements > Show table (nsr)` to reopen it. \r\n\r\nYou just need to select the labels layer the properties are associated with.\r\n\r\n\r\n\r\nFor visualizing measurements with different grey values, as parametric images, you can double-click table headers.\r\n\r\n\r\n\r\n![img.png](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/label_value_visualization.gif)\r\n\r\n\r\n\r\n## Usage: measure point intensities\r\n\r\n\r\n\r\nAnalogously, also the intensity and coordinates of point layers can be measured using the menu `Tools > Measurement > Measure intensity at point coordinates (nsr)`. \r\n\r\nAlso these measurements can be visualized by double-clicking table headers:\r\n\r\n\r\n\r\n![img.png](measure_point_intensity.png)\r\n\r\n\r\n\r\n![img_1.png](measure_point_coordinate.png)\r\n\r\n\r\n\r\n## Working with time-lapse and tracking data\r\n\r\n\r\n\r\nNote that tables for time-lapse data should include a column named \"frame\", which indicates which slice in\r\n\r\ntime the given row refers to. If you want to import your own csv files for time-lapse data make sure to include this column.\r\n\r\nIf you have tracking data where each column specifies measurements for a track instead of a label at a specific time point,\r\n\r\nthis column must not be added.\r\n\r\n\r\n\r\nIn case you have 2D time-lapse data you need to convert it into a suitable shape using the function: `Tools > Utilities > Convert 3D stack to 2D time-lapse (time-slicer)`,\r\n\r\nwhich can be found in the [napari time slicer](https://www.napari-hub.org/plugins/napari-time-slicer).\r\n\r\n\r\n\r\nLast but not least, make sure that in case of time-lapse data the label image has labels that are subsquently labeled per timepoint.\r\n\r\nE.g. a dataset where label 5 is missing at timepoint 4 may be visualized incorrectly.\r\n\r\n\r\n\r\n## Usage: multichannel or multi-label data\r\n\r\n\r\n\r\nIf you want to relate objects from one channels to objects from another channel, you can use `Tools > Measurement tables > Object Features/Properties (scikit-image, nsr)`. \r\n\r\nThis plugin module allos you to answer questions like:\r\n\r\n  - how many objects I have inside other objects?\r\n\r\n  - what is the average intensity of the objects inside other objects?\r\n\r\nFor that, you need at least two labeled images in napari. You can relate objects along with their features. \r\n\r\nIf intensity features are also wanted, then you also need to provide two intensity images. \r\n\r\nBelow, there is a small example on how to use it. \r\n\r\nAlso, take a look at [this example notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/measure_relationship_to_other_channels_plugin.ipynb).\r\n\r\n \r\n\r\n ![](https://github.com/haesleinhuepf/napari-skimage-regionprops/raw/master/images/things_inside_things_demo.gif)\r\n\r\n\r\n\r\n## Usage, programmatically\r\n\r\n\r\n\r\nYou can also control the tables programmatically. See this \r\n\r\n[example notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/tables.ipynb) for details on regionprops and\r\n\r\n[this example notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/measure_points.ipynb) for details on measuring intensity at point coordinates. For creating parametric map images, see [this notebook](https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/demo/map_measurements.ipynb).\r\n\r\n\r\n\r\n\r\n\r\n## Features\r\n\r\nThe user can select categories of features for feature extraction in the user interface. These categories contain measurements from the scikit-image [regionprops list of measurements](https://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops) library:\r\n\r\n* size:\r\n\r\n  * area\r\n\r\n  * bbox_area\r\n\r\n  * convex_area\r\n\r\n  * equivalent_diameter\r\n\r\n* intensity:\r\n\r\n  * max_intensity \r\n\r\n  * mean_intensity\r\n\r\n  * min_intensity\r\n\r\n  * standard_deviation_intensity (`extra_properties` implementation using numpy)\r\n\r\n* perimeter:\r\n\r\n  * perimeter\r\n\r\n  * perimeter_crofton\r\n\r\n* shape\r\n\r\n  * major_axis_length\r\n\r\n  * minor_axis_length\r\n\r\n  * orientation\r\n\r\n  * solidity\r\n\r\n  * eccentricity\r\n\r\n  * extent\r\n\r\n  * feret_diameter_max\r\n\r\n  * local_centroid\r\n\r\n  * roundness as defined for 2D labels [by ImageJ](https://imagej.nih.gov/ij/docs/menus/analyze.html#set)\r\n\r\n  * circularity as defined for 2D labels  [by ImageJ](https://imagej.nih.gov/ij/docs/menus/analyze.html#set)\r\n\r\n  * aspect_ratio as defined for 2D labels [by ImageJ](https://imagej.nih.gov/ij/docs/menus/analyze.html#set)\r\n\r\n* position:\r\n\r\n  * centroid\r\n\r\n  * bbox\r\n\r\n  * weighted_centroid\r\n\r\n* moments:\r\n\r\n  * moments\r\n\r\n  * moments_central\r\n\r\n  * moments_hu\r\n\r\n  * moments_normalized\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\nThis [napari] plugin was generated with [Cookiecutter] using with [@napari]'s [cookiecutter-napari-plugin] template.\r\n\r\n\r\n\r\n## See also\r\n\r\n\r\n\r\nThere are other napari plugins with similar functionality for extracting features:\r\n\r\n* [morphometrics](https://www.napari-hub.org/plugins/morphometrics)\r\n\r\n* [PartSeg](https://www.napari-hub.org/plugins/PartSeg)\r\n\r\n* [napari-simpleitk-image-processing](https://www.napari-hub.org/plugins/napari-simpleitk-image-processing)\r\n\r\n* [napari-cupy-image-processing](https://www.napari-hub.org/plugins/napari-cupy-image-processing)\r\n\r\n* [napari-pyclesperanto-assistant](https://www.napari-hub.org/plugins/napari-pyclesperanto-assistant)\r\n\r\n\r\n\r\nFurthermore, there are plugins for postprocessing extracted measurements\r\n\r\n* [napari-feature-classifier](https://www.napari-hub.org/plugins/napari-feature-classifier)\r\n\r\n* [napari-clusters-plotter](https://www.napari-hub.org/plugins/napari-clusters-plotter)\r\n\r\n* [napari-accelerated-pixel-and-object-classification](https://www.napari-hub.org/plugins/napari-accelerated-pixel-and-object-classification)\r\n\r\n\r\n\r\n## Installation\r\n\r\n\r\n\r\nYou can install `napari-skimage-regionprops` via [pip]:\r\n\r\n\r\n\r\n    pip install napari-skimage-regionprops\r\n\r\n\r\n\r\nOr if you plan to develop it:\r\n\r\n\r\n\r\n    git clone https://github.com/haesleinhuepf/napari-skimage-regionprops\r\n\r\n    cd napari-skimage-regionprops\r\n\r\n    pip install -e .\r\n\r\n\r\n\r\nIf there is an error message suggesting that git is not installed, run `conda install git`.\r\n\r\n\r\n\r\n## Contributing\r\n\r\n\r\n\r\nContributions are very welcome. Tests can be run with [tox], please ensure\r\n\r\nthe coverage at least stays the same before you submit a pull request.\r\n\r\n\r\n\r\n## License\r\n\r\n\r\n\r\nDistributed under the terms of the [BSD-3] license,\r\n\r\n\"napari-skimage-regionprops\" is free and open source software\r\n\r\n\r\n\r\n## Issues\r\n\r\n\r\n\r\nIf you encounter any problems, please create a thread on [image.sc] along with a detailed description and tag [@haesleinhuepf].\r\n\r\n\r\n\r\n[napari]: https://github.com/napari/napari\r\n\r\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\r\n\r\n[@napari]: https://github.com/napari\r\n\r\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\r\n\r\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\r\n\r\n[image.sc]: https://image.sc\r\n\r\n[napari]: https://github.com/napari/napari\r\n\r\n[tox]: https://tox.readthedocs.io/en/latest/\r\n\r\n[pip]: https://pypi.org/project/pip/\r\n\r\n[PyPI]: https://pypi.org/\r\n\r\n[scikit-image]: https://scikit-image.org/\r\n\r\n[@haesleinhuepf]: https://twitter.com/haesleinhuepf\r\n\r\n",
    "bugtrack_url": null,
    "license": "BSD-3",
    "summary": "A regionprops table widget plugin for napari",
    "version": "0.10.1",
    "project_urls": {
        "Homepage": "https://github.com/haesleinhuepf/napari-skimage-regionprops"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28ba4d38178cc15721eec82634d34e94b386e3f830f6f6c9d9bee10b4c6fb6a3",
                "md5": "6f0b79423449f4d890f35bc5d61977a1",
                "sha256": "d9c3fb65c7a47a4f68eb577e901759826ca5b0f6669279f50b93441709766264"
            },
            "downloads": -1,
            "filename": "napari_skimage_regionprops-0.10.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f0b79423449f4d890f35bc5d61977a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 33573,
            "upload_time": "2023-05-19T16:47:36",
            "upload_time_iso_8601": "2023-05-19T16:47:36.309648Z",
            "url": "https://files.pythonhosted.org/packages/28/ba/4d38178cc15721eec82634d34e94b386e3f830f6f6c9d9bee10b4c6fb6a3/napari_skimage_regionprops-0.10.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0168b016a3a76e631bbf0b74104f0c073e1d5065a71ab4476a370e52e153450a",
                "md5": "894557b9f2e27bace1914a8a2b00964a",
                "sha256": "a25f8a84ad78f5d09074a32d84996fb6ff900bf82369dfb50501872d23dc22bc"
            },
            "downloads": -1,
            "filename": "napari-skimage-regionprops-0.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "894557b9f2e27bace1914a8a2b00964a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 431302,
            "upload_time": "2023-05-19T16:47:39",
            "upload_time_iso_8601": "2023-05-19T16:47:39.271471Z",
            "url": "https://files.pythonhosted.org/packages/01/68/b016a3a76e631bbf0b74104f0c073e1d5065a71ab4476a370e52e153450a/napari-skimage-regionprops-0.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-19 16:47:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "haesleinhuepf",
    "github_project": "napari-skimage-regionprops",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "napari-plugin-engine",
            "specs": [
                [
                    ">=",
                    "0.1.4"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "scikit-image",
            "specs": []
        },
        {
            "name": "napari",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "napari-tools-menu",
            "specs": [
                [
                    ">=",
                    "0.1.19"
                ]
            ]
        },
        {
            "name": "napari-workflows",
            "specs": []
        },
        {
            "name": "imageio",
            "specs": [
                [
                    "!=",
                    "2.22.1"
                ]
            ]
        },
        {
            "name": "Deprecated",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "napari-skimage-regionprops"
}
        
Elapsed time: 0.08366s