bartpy

Python bindings for BART.

Overview

This repo contains code to generate an updated Python wrapper for the Berkeley Advance Reconstruction Toolbox. The repo aims to expose command line tools and internal library functions to Python users.

The command line tools can be listed by running bart from the command line:

tools

Each of these has been exposed to the command-line via the bartpy.tools library:

code
img

For users looking to integrate BART functions into existing Python workflows, and work fluidly with Numpy, SigPy, or other scientific packages, bartpy.tools should suffice!

[In Development] For developers looking to build Python tools using BART's internal C functions, the internal library functions expose BART's development libraries to the user. This is currently under production and not accessible via the master branch.

Requirements

BART version 0.7.00. It is important that running a bart command with the --interface option is successful. For example, you should see something like the following for running bart fft --interface:

interface

Ensure you have Python >= 3.6 and run pip install -r requirements.txt to install necessary dependencies.

Installation.

Once BART and the required libraries are installed, clone this repo.

To support the growth of BART with minimal overhead, the Python code is autogenerated from a user's BART installation. Run python3 setup.py install to build the tools library and install it. If successful, you should be able to import bartpy.tools and interface with the tutorials located in the demos folder.

Before working with the demos folder, unzip data.zip; this file contains the necessary datasets for the demos.

For Developers

The build_tools folder contains the necessary code for generating the tools wrappers.

Low-Level

Documentation on SWIG exists in the doc/ folder along with several links to SWIG documentation for developers interested in working with the experimental wrappers.

GitHub - malits/bartpy: Python wrappers for external BART computational imaging tools and internal libraries
Python wrappers for external BART computational imaging tools and internal libraries - GitHub - malits/bartpy: Python wrappers for external BART computational imaging tools and internal libraries