{"name":"napari-orientation","display_name":"Orientation Analysis","visibility":"public","icon":"","categories":["Image Processing"],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-orientation.vector_field_widget","title":"Generate vector-coded orientation image","python_name":"napari_orientation.orientation_field_widget:vector_field_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-orientation.statistics_widget","title":"Compute orientation metrics","python_name":"napari_orientation.orientation_field_widget:statistics_widget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-orientation.vector_field_widget","display_name":"Generate vector-coded image","autogenerate":false},{"command":"napari-orientation.statistics_widget","display_name":"Compute orientation metrics","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"napari-orientation","version":"0.1.6","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"A napari plugin to analyse local orientation in images","description":"# napari-orientation\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-orientation.svg?color=green)](https://github.com/giocard/napari-orientation/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-orientation.svg?color=green)](https://pypi.org/project/napari-orientation)\n[![Python package index download statistics](https://img.shields.io/pypi/dm/napari-orientation.svg)](https://pypistats.org/packages/napari-orientation)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-orientation.svg?color=green)](https://python.org)\n[![tests](https://github.com/giocard/napari-orientation/workflows/tests/badge.svg)](https://github.com/giocard/napari-orientation/actions)\n[![codecov](https://codecov.io/gh/giocard/napari-orientation/branch/main/graph/badge.svg)](https://codecov.io/gh/giocard/napari-orientation)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-orientation)](https://napari-hub.org/plugins/napari-orientation)\n[![npe2](https://img.shields.io/badge/plugin-npe2-blue?link=https://napari.org/stable/plugins/index.html)](https://napari.org/stable/plugins/index.html)\n[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json)](https://github.com/copier-org/copier)\n\nA napari plugin to analyse local orientation in images.\n\n## Installation\n\nYou can install the plugin from the napari GUI interface by going to ```Plugins/Install\\Uninstall Plugins``` and selecting `napari-orientation`.\nAlternatively, you can install the plugin from the napari conda environment via [pip]:\n\n```text\npip install napari-orientation\n```\n\n## Usage\n\nYou can access all the functionalities of the plugin from the menu ```Plugins\\Orientation Analysis```.\n\nAll the analyses work only on single-channel 2D images and on single-channel 2D time series.\nIn this last case the analysis can be restricted to single frames.\n\nThe only parameter available is the sigma smoothing, in pixels, which controls the strength of the gaussian filter applied to the gradient of the image before computing the orientation vector pixelwise.\n\nCurrently two widgets are available: __Compute orientation metrics__ and __Generate vector-coded images__\n\n### Compute orientation metrics\n\nThis GUI gives access to most of the functionalities. You can compute several metrics and display them as images.\n\nDefinitions:\n\n* __Orientation vector__: unitary vector describing the average orientation of the gradient of the intensity around a point in the image. Computationally this is obtained by determining the first eigenvector (i.e. largest eigenvalue) of the structure tensor matrix.\n* __Orientation field__: mapping of the orientation vectors at each point in the image.\n* __Angle field__: mapping of the orientation angle at each point in the image\n* __Energy__: sum of the tensor eigenvalues.\n* __Coherence__: ratio between the difference and the sum of the maximum and minimum tensor eigenvalues.\n* __Curvature__: rate of change in the local orientation in the direction perpendicular to that orientation.\n* __Correlation length__: distance where the radial autocorrelation of the angle field drops below 0.5\n\n#### Display Colored Orientation\n\nIt computes an image where each pixel is colored differently according to the orientation angle estimated at that position.\n\n![Example colored orientation](docs/example_colored_orientation.png)\n\n#### Display Coherence\n\nIt computes an image where the value of each pixel represents the coherence estimated at that position.\n\n![Example coherence](docs/example_coherence.png)\n\n#### Display Curvature\n\nIt computes an image where the value of each pixel represents the curvature estimated at that position.\n\n![Example coherence](docs/example_curvature.png)\n\n#### Display Angle\n\nIt computes an image where the value of each pixel represents the angle, in degrees, estimated at that position.\n\n![Example coherence](docs/example_angle.png)\n\n#### Compute statistics\n\nEstimate the average value for the following metrics: Energy, Coherence, Correlation length, Curvature.\n\nThe average curvature is estimated as the half life of the exponential decay function modeling the distribution of curvature values in the image.\n\nNote that Correlation length and Curvature metrics are both provided in physical units, and therefore their determination relies on the accuracy of the pixel size provided for the image. Using the napari-bioformats to open the images should guarantee that the pixel size stored in the file metadata is properly read by the plugin. In any case it always possible to adjust the pixel size from the interface.\n\n![Example statistics](docs/example_statistics.png)\n\n### Generate vector-coded images\n\nIt generates a vector layer displaying the orientation field estimated locally, over a grid with spacing defined by the user.\n\n![Example vectors](docs/example_vectors.png)\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-orientation\" 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## Credits\n\nThis [napari] plugin was generated with [copier] using the [napari-plugin-template] (None).\n\nThis work was inspired by the plugin [OrientationJ] for ImageJ, that was partially converted by the same developers into a [plugin for napari](https://github.com/EPFL-Center-for-Imaging/napari-orientationpy).\n\nnapari-orientation focuses on the computation of several metrics, some of them proposed in this [article](https://doi.org/10.1038/s41467-019-13702-4)\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\n[napari]: https://github.com/napari/napari\n[copier]: https://copier.readthedocs.io/en/stable/\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[napari-plugin-template]: https://github.com/napari/napari-plugin-template\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[OrientationJ]: https://github.com/Biomedical-Imaging-Group/OrientationJ\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"giocard","author_email":"cardone@biochem.mpg.de","maintainer":null,"maintainer_email":null,"license":"Copyright (c) 2025, Giovanni Cardone, Max Planck Institute of Biochemistry\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.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13","Programming Language :: Python :: 3.14","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy","magicgui","qtpy","scikit-image","matplotlib","napari[all]; extra == \"all\""],"requires_python":">=3.10","requires_external":null,"project_url":null,"provides_extra":["all"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}