Napari plugin for the Orientationpy project.
Project description
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
- Select the structural scale parameter
sigma
. This value control represents the scale at which the image gradients are computed. Try different values ofsigma
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.
-
If you are analyzing a 3D image, select
fiber
ormembrane
mode. Infiber
mode, the orientation normals follow fibrous structures. Inmembrane
mode, the orientations are normal to the surface of membranous structures. -
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 aVectors
layer in Napari. They are sampled on a regular grid defined by theSpacing (X)
,Spacing (Y)
andSpacing (Z)
values (for 2D images, theZ
value is ignored). The length of the vectors can be rescaled based on theenergy
value of the orientation computation. - You can also output the local
orientation gradient
(misorientation).
- Compute orientation. This button will trigger the orientation computation only when necessary (i.e. when the value of
sigma
, themode
or theimage
have changed). If you only adjust theorientation vectors
parameters, clicking the compute button will update the results very fast. - Save orientation (CSV). This will save the orientation measurements as a CSV table with columns
X
,Y
,Z
,theta
,phi
,energy
, andcoherency
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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 424a9dc2947bd0254851c9970c661dee86d812b0c29c3d8058d2e5ab75422ca6 |
|
MD5 | 0d1a21dde6e6bba45ebf045a64bc88fa |
|
BLAKE2b-256 | 03360dad956e6592d07ae80a066398999563c34b135df469ea47b73019347eda |
File details
Details for the file napari_orientationpy-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: napari_orientationpy-0.0.7-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64446d77b6128ee7c03154402b1e82c4e52922c99e313d3358f5a62e50e6d478 |
|
MD5 | 948c7f2b6b2e8bb9a9c23c8c5e97d743 |
|
BLAKE2b-256 | d63a73600c62bc186218c58a4f11e9844b524fa476c0c79aa050034ce118a80f |