Skip to content

ornlneutronimaging/RootPlantProcessing

Repository files navigation

pre-commit.ci status

Root Processing

This is the root processing suite, rhizotools (rhizo means "root related"), for images at the ORNL MARS (formerly CG-1D) beamline.

Quick Start

Installation

Using Pip

pip install rhizotools

Using Pixi (Recommended)

# Install pixi if you don't have it already
curl -fsSL https://pixi.sh/install.sh | bash

# Create a new environment with rhizotools
pixi init --name my-rhizo-project
cd my-rhizo-project
pixi add rhizotools

# Activate the environment
pixi shell

Using Conda

conda install -c conda-forge rhizotools

Development Guide

Setting Up Development Environment

# Clone the repository
git clone https://github.com/ornlneutronimaging/RootPlantProcessing.git
cd RootPlantProcessing

# Set up development environment with pixi
pixi install

# Activate the environment
pixi shell

Development Workflow

# Run tests
pixi run test

# Run linting checks
pixi run ruff check .

# Format code
pixi run ruff format .

# Build the package
pixi run build-pypi

# Build documentation
pixi run build-docs

Adding Dependencies

To add new dependencies:

  1. Add Python dependencies to [project.dependencies] in pyproject.toml
  2. Add pixi/conda dependencies to [tool.pixi.dependencies] in pyproject.toml
  3. Run pixi install to update your environment

How to Use

# Importing sample dataset
wd = '/Users/...'  # Specify where you saved your sample data
from rhizotools.sampledata import sampledata
sampledata(wd)

# Running Code - Default Settings
from rhizotools.RP_run import RP_run
analysis_list = [
    'RP_stitch',
    'RP_crop',
    'RP_wc',
    'RP_mask',
    'RP_imagefilter',
    'RP_distmap',
    'RP_radwc',
    'RP_thickness',
    'RP_rootimage',
]
wd_userconfig = wd+'/Sample_Data'  # Specify where you saved your user_config file
RP_run(wd, wd_userconfig, analysis_list)

Known issue

  1. When using pixi install for the first time, you might see the following error messages. The solutions is to increase your file limit with ulimit -n 65535 and then run pixi install again.
Too many open files (os error 24) at path

About

Processing of roots (segmentation, registration...)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages