Skip to main content

A tool to delineate bark, pith and xylem annual rings and to measure their area and thickness 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 Trunk tag: find the outermost bark just on image
  • Run button on the Segment Rings tag: find the pith and annual rings 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 or the expected ring thickness (in pixels). 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 make up the calculated parameters.
  • area: region's area.
  • area_convex: area, which is the smallest convex polygon enclosing the region, of the convex hull image.
  • axis_major_length: length of the ring borders' main axis
  • axis_minor_length: length of the ring borders' minor axis
  • eccentricity: The eccentricity, which ranges from 0 to 1, is the focal distance divided by the major axis length. When the maximum Feret's diameter, which is the largest distance between points across the convex hull, is zero, the region becomes a circle.
  • orientation: angle, measured in radians and ranging from $-pi/2$ to $pi/2$ anticlockwise, between the main axis and the vertical axis.
  • area_growth: the area between the two ring boundaries that experiences growth over the course of a year.

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.3.tar.gz (32.9 kB 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.3-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: napari_tree_rings-0.1.3.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • 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.3.tar.gz
Algorithm Hash digest
SHA256 f3ad127976c588c7be6d78e11dbca49c520317efe46bf2867426dca6bb5d571a
MD5 476615669e643c5b7eabd97c6149bdd0
BLAKE2b-256 a27d79602b37a32ed135328371077000e716c3b9c33a426f4c856475c0435820

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for napari_tree_rings-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4811ea4f268b2fd14bff4e6d0d945064b2c2634b2faaad3eb530216691649ab9
MD5 fc76a5a46a9f3e27d0a42024bc3af587
BLAKE2b-256 d0c5e5e94195555218d180ad7e0cc412644556959ae796145edada07392e2df2

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