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.
  • 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.
  • 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).

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.4.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.4-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: napari_tree_rings-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5317eac2d13ff47e3a84ab2acd23198202687a6fa51b0689f60d93b429ce6101
MD5 4d75f64041ec8141c61a771a63604e1e
BLAKE2b-256 9f93f130c82fedf62191115983e58bd847791838a36d3463f0f20e7dc93eafb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for napari_tree_rings-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 56019c880e664e60f188273841b08555bb380f814d03fc833d45f98294257eaf
MD5 fe5fdf52a685889a58036fd8a49687f2
BLAKE2b-256 3f9ce7ce02207901c84a5e05ee67c7cd251cd4ea567856f1d91c2d416a2c5368

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