Skip to main content

A program that calculates head circumference from MRI data (.nii, .nii.gz, .nrrd).

Project description

NeuroRuler

Tests Code style: black Python

A program that calculates head circumference from MRI data (.nii, .nii.gz, .nrrd).

GUI demo

Cite this tool

If you want 😉 format is bibtex.

@misc{neuroruler,
  title={NeuroRuler},
  author={Wei, Jesse and Lester, Madison and He, Peifeng and Schneider, Eric and Styner, Martin},
  howpublished={\url{https://github.com/COMP523TeamD/NeuroRuler}},
  year={2023}
}

Install

Your Python version needs to be 3.8+. Check with python --version. Install via pip.

pip install NeuroRuler

If pip doesn't work, try pip3.

If contributing to this repo, please fork and run pip install -r requirements.txt to install additional development dependencies (for code formatting, documentation, etc.). After installing additional dependencies, run pre-commit install to enable pre-commit actions.

Run GUI

Run these commands in a Python terminal:

from NeuroRuler.GUI import gui
gui()

Note: If you make changes to the repo, then use the gui.py script to run the GUI. Changes you make will not be reflected in the package from pip until uploaded to PyPI.

See release for how to upload to PyPI or Test PyPI.

Configure settings

Edit config.json.

You can also supply CLI arguments, which override settings in config.json.

usage: gui.py [-h] [-d] [-e] [-t THEME] [-c COLOR]

options:
  -h, --help            show this help message and exit
  -d, --debug           print debug info
  -e, --export-index    exported file names use the index displayed in the GUI instead of the original file name
  -t THEME, --theme THEME
                        configure theme, options are dark, dark-green, dark-hct, dark-purple, light, light-green, light-hct, or
                        light-purple
  -c COLOR, --color COLOR
                        contour color as name (e.g. red) or hex color code rrggbb

Run tests

pytest

Our unit tests run on GitHub Actions on push and PR. The results are on GitHub.

Documentation

https://NeuroRuler.readthedocs.io

See .readthedocs.yaml and docs/.

Pre-commit actions

Run pre-commit install to enable pre-commit actions.

Before each commit, the actions in .pre-commit-config.yaml will be run. Specifically, code will be reformatted with black. Note that some file names are excluded, so don't name any source code files those names.

Release

To publish to PyPI, edit the version number in setup.py. Push a tagged (use the version number) commit to the main branch (can be done through PR) to publish to PyPI (these actions cause the pypi.yml action to run).

The version number on PyPI will be the one in setup.py, so make sure it's correct!

To publish on Test PyPI, edit the version number, and push to a branch called release-testpypi (create it if it doesn't exist).

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

NeuroRuler-0.0.4.tar.gz (519.4 kB view hashes)

Uploaded Source

Built Distribution

NeuroRuler-0.0.4-py3-none-any.whl (550.5 kB view hashes)

Uploaded Python 3

Supported by

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