Skip to main content

A tool to delineate bark, pith and xylem annual rings and to measure their property parameters on circular sections of tree trunks.

Project description

napari-tree-rings

License MIT PyPI Python Version tests codecov napari hub

A tool to delineate bark, pith and xylem annual rings and to measure their property parameters on circular sections of tree trunks.


This napari plugin was generated with copier using the napari-plugin-template.

How to use it?

Users can export the segmentation findings and estimate bark, ring borders, and pith with ease using the Napari Tree Rings plugin:

  • Run button on the Segment Rings tag: find the rings in just one image.
  • Run Batch button on the Batch Segment Trunk tag: runs all the images in the folder.

Users can also modify certain parameters, including the batch size. The interface's goal is to assist biologists without having programming expertise by being user-friendly.

If accessible, the unit of micrometres will be used to determine the parameters; if not, pixels will be used. The calculated parameters are made up of:

  • bbox: The bounding box’s minimum and maximum coordinates on the horizontal and vertical axes.

  • perimeter: perimeter of the region, measured as the length of the contour.

  • area: Region’s area.

  • area_convex: Area of the convex hull image, which is the smallest convex polygon enclosing the region.

  • axis_major_length: Length of the ring boundaries’ major axis.

  • axis_minor_length: Length of the ring boundaries’ minor axis.

  • eccentricity: The eccentricity, which ranges from 0 to 1, is the focal distance divided by the major axis length. When the eccentricity is zero, the region becomes a circle.

  • feret_diameter_max: The maximum Feret's diameter, which is the largest distance between points across the convex hull.

  • orientation: Angle between the major axis and the vertical axis, measured in radians and ranging from -pi/2 to pi/2 anticlockwise.

  • area_growth: The area between the two ring boundaries that experiences growth over a year (except the cases of pith and bark).

  • For more details, check the detailed documentation.

Installation

You can install napari-tree-rings via pip:

pip install napari-tree-rings

Adding other measurements

If you would like to add other measurements while running batch, you can modify BatchSegmentTrunk.run in the src/napari_tree_rings/image/process.py. There is an example of area_growth for you to see and refer to.

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 MIT license, "napari-tree-rings" 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_tree_rings-0.1.5.tar.gz (11.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_tree_rings-0.1.5-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file napari_tree_rings-0.1.5.tar.gz.

File metadata

  • Download URL: napari_tree_rings-0.1.5.tar.gz
  • Upload date:
  • Size: 11.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for napari_tree_rings-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6452c6f19b647ea357fea11552afb640e7e4bbece62115a02e85e6140f621cf5
MD5 849a5a29c0c1ed9884cf5e0f66b82527
BLAKE2b-256 b3e13619e39b6eafc4d4b4b03448fed2ea7af65e463e75a52e8afdc57d6941cd

See more details on using hashes here.

File details

Details for the file napari_tree_rings-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_tree_rings-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a1c48013d4456444ffcb85500ce3a5731f5f0a2372f36d3ac5787c28cc29121b
MD5 8865b2574e2ec3055a5f8bb2e738223e
BLAKE2b-256 9b7b69655855c25a1cecf20e7673fc4621cbc5d7982b48b6b750ecc5804e2006

See more details on using hashes here.

Supported by

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