A user interface to run supervised machine learning-based iterative reconstruction (SVMBIR) code with AI assistance for CT image reconstruction and analysis.
pip install hyperctuiThe package requires tomopy to function, which can be installed either with conda or directly from source Github.
Make sure you install tomopy before running the application if installed with pip.
# Install pixi if you don't have it already
curl -fsSL https://pixi.sh/install.sh | bash
# Create a new environment with hyperctui
pixi init --name my-hyperctui-project
cd my-hyperctui-project
pixi add hyperctui
# Start the application
pixi run hyperctuiconda install -c neutronimaging hyperctui# Clone the repository
git clone https://github.com/ornlneutronimaging/HyperCTui.git
cd HyperCTui
# Set up development environment with pixi
pixi install
# Start the application
pixi run hyperctui
# Activate the environment
pixi shell# 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-docsTo add new dependencies:
-
Add Python dependencies to
[project.dependencies]inpyproject.toml, or usepixi add --pypi <package-name>.-
For example, to add
numpy, run:pixi add --pypi numpy
-
-
Add pixi/conda dependencies to
[tool.pixi.dependencies]inpyproject.toml, or usepixi add <package-name>.-
For example, to add
scipy, run:pixi add scipy
-
-
Run
pixi installto update your environment.
- Contact the project maintainer for developer access to the repository
- Always create feature branches based off the
nextbranch - All tests must pass before merging your changes
- Submit a pull request for review, linking any related issues
- Please fork the repository and make your suggested edits there
- Submit a pull request from your fork to our
nextbranch - Ensure all tests pass before submitting your PR
- Run
pixi run pre-commit installat least once in your checkout repository to ensure pre-commit hooks are installed locally - These hooks will automatically check and fix many common style issues
- We follow PEP 8 guidelines with certain exceptions defined in our configuration files
-
We prefer using type hinting for all function parameters and return values:
def process_image(image_data: np.ndarray, factor: float = 1.0) -> np.ndarray: """Process the given image data. Parameters ---------- image_data : np.ndarray The input image as a numpy array factor : float, optional Scaling factor to apply, by default 1.0 Returns ------- np.ndarray The processed image """
-
Use NumPy style docstrings for all public methods and functions
- New features should have corresponding unit tests
- We do not force Test-Driven Development (TDD), but we highly recommend it
- Aim for high test coverage, especially for critical functionality
- Tests are automatically run on PR submission
The application can be started with hyperctui in the Python environment it is installed, for development environment managed by pixi, use:
pixi run hyperctui- When using
pixi installfor the first time, you might see the following error messages. The solution is to increase your file limit withulimit -n 65535and then runpixi installagain.
Too many open files (os error 24) at path