Skip to main content

Napari plugin for the Orientationpy project.

Project description

EPFL Center for Imaging logo

napari-orientationpy

Analyze orientations in 2D, 3D, and RGB images in Napari. This plugin is based on the Orientationpy project.

Installation

You can install napari-orientationpy via pip:

pip install napari-orientationpy

Usage

To get started, open an image in the Napari viewer and start napari-orientationpy from the Plugins menu:

Plugins > Napari Orientationpy > Orientation measurement
  1. Select the structural scale parameter sigma. This value control represents the scale at which the image gradients are computed. Try different values of sigma to understand what works best for your images. A reasonable guess would be the order in size, in pixels, of the structures that you are interested in. For example, if you are imaging fibers that appear to be about 4 pixels wide, try to set a value of sigma=4.

  1. If you are analyzing a 3D image, select fiber or membrane mode. In fiber mode, the orientation normals follow fibrous structures. In membrane mode, the orientations are normal to the surface of membranous structures.

  2. Decide which outputs you'd like to visualize.

  • The color-coded orientation is a pixel-wise representation of 3D orientations as colors (similar colors = similar orientations).
  • The orientation vectors get rendered in a Vectors layer in Napari. They are sampled on a regular grid defined by the Spacing (X), Spacing (Y) and Spacing (Z) values (for 2D images, the Z value is ignored). The length of the vectors can be rescaled based on the energy value of the orientation computation.
  • You can also output the local orientation gradient (misorientation).
  1. Compute orientation. This button will trigger the orientation computation only when necessary (i.e. when the value of sigma, the mode or the image have changed). If you only adjust the orientation vectors parameters, clicking the compute button will update the results very fast.
  2. Save orientation (CSV). This will save the orientation measurements as a CSV table with columns X, Y, Z, theta, phi, energy, and coherency for all the pixels in the image.

Plotting the 3D orientation distribution

If you have computed orientation vectors for a 3D image, you can plot their spatial distribution as a stereographic projection along the X, Y or Z direction directly in Napari. Select the widget from:

Plugins > Napari Orientationpy > Orientation distribution (3D)

Sample images

We provide a few sample images to test our plugin. Open them from:

File > Open Sample > Napari Orientationpy

Contributing

Contributions are very welcome. Please get in touch if you'd like to be involved in improving or extending the package.

License

Distributed under the terms of the BSD-3 license, "napari-orientationpy" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari-orientationpy-0.0.7.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

napari_orientationpy-0.0.7-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file napari-orientationpy-0.0.7.tar.gz.

File metadata

  • Download URL: napari-orientationpy-0.0.7.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for napari-orientationpy-0.0.7.tar.gz
Algorithm Hash digest
SHA256 424a9dc2947bd0254851c9970c661dee86d812b0c29c3d8058d2e5ab75422ca6
MD5 0d1a21dde6e6bba45ebf045a64bc88fa
BLAKE2b-256 03360dad956e6592d07ae80a066398999563c34b135df469ea47b73019347eda

See more details on using hashes here.

File details

Details for the file napari_orientationpy-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_orientationpy-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 64446d77b6128ee7c03154402b1e82c4e52922c99e313d3358f5a62e50e6d478
MD5 948c7f2b6b2e8bb9a9c23c8c5e97d743
BLAKE2b-256 d63a73600c62bc186218c58a4f11e9844b524fa476c0c79aa050034ce118a80f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page