Skip to main content

AxSI for MRI data

Project description

Usage Guide

Overview

This documentation provides details on how to use the AxSI parser for analyzing MRI data using various input parameters.

Run from Command Line

To execute the program via the command line, use the following syntax:

python axsi.py \
  --subj-folder /path/to/subject_folder \
  --data /path/to/data.nii.gz \
  --bval /path/to/bval.bval \
  --bvec /path/to/bvec.bvec \
  --mask /path/to/mask.nii.gz \
  --small-delta 20 \
  --big-delta 50 \
  --gmax 8.0 \
  --gamma-val 4258 \
  --num-processes 4 \
  --num-threads 8 \
  --linear-lsq-method gurobi \
  --nonlinear-lsq-method scipy \
  --debug-mode

Required Arguments

  • --subj-folder: Path to the subject folder
  • --data: Path to the data file
  • --bval: Path to the bval file
  • --bvec: Path to the bvec file
  • --mask: Path to the mask file

Optional Arguments

  • --small-delta (default: 15): Gradient duration in milliseconds.
  • --big-delta (default: 45): Time to scan (time interval) in milliseconds.
  • --gmax (default: 7.9): Gradient maximum amplitude in G/cm.
  • --gamma-val (default: 4257): Gyromagnetic ratio.
  • --num-processes (default: 1): Number of processes to run in parallel.
  • --num-threads (default: 1): Number of threads to run in parallel.
  • --linear-lsq-method (default: R-quadprog): Method for linear least squares. **Choices **: R-quadprog, gurobi, scipy, cvxpy
  • --nonlinear-lsq-method (default: R-minpack): Method for nonlinear least squares. **Choices **: R-minpack, scipy, lsq-axsi
  • --debug-mode: Enable debug mode. If not provided, debug mode is disabled by default.

Examples

Basic Example

python axsi.py \
  --subj-folder ./subject1 \
  --data ./data.nii.gz \
  --bval ./bval.bval \
  --bvec ./bvec.bvec \
  --mask ./mask.nii.gz

Advanced Example with Custom Parameters

python axsi.py \
  --subj-folder ./subject1 \
  --data ./data.nii.gz \
  --bval ./bval.bval \
  --bvec ./bvec.bvec \
  --mask ./mask.nii.gz \
  --small-delta 25 \
  --big-delta 55 \
  --gmax 9.0 \
  --gamma-val 4260 \
  --num-processes 8 \
  --num-threads 16 \
  --linear-lsq-method scipy \
  --nonlinear-lsq-method lsq-axsi \
  --debug-mode

NIfTI Viewer

Overview

This is a Dash-based web application that allows users to interactively visualize slices of 3D or 4D NIfTI files ( commonly used in neuroimaging). Users can select slices along different axes, apply various color maps, and visualize data dynamically using sliders for timepoints (in 4D data) and slice indices.

Features

Input File Handling

  • The NIfTI file path is provided as a command-line argument using argparse.
  • The script loads and processes the provided file using the nibabel library.

Visualization

  • Supports visualization along three axes: axial, sagittal, and coronal.
  • Provides several color maps (e.g., gray, viridis, plasma) for the visualization.
  • Interactive user interface for exploring slices.

4D Data Support

  • If the input NIfTI file contains 4D data (e.g., time-series or multi-volume data), a slider lets users navigate through different timepoints.

User Controls

  • Dropdown menus to select the viewing axis and color map.
  • Sliders for selecting specific slices and timepoints.

Output

  • The visualization is rendered as an interactive plot using Plotly.

Getting Started

Run the script from the command line, providing the NIfTI file path as an argument:

python nifti_viewer.py --nifti_file /path/to/your/file.nii.gz

Example

python nifti_viewer.py --nifti_file example_data/pasi.nii.gz

The app runs at http://127.0.0.1:8050 by default, displaying the interactive visualization.

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

axsi-0.0.2.tar.gz (30.3 kB view details)

Uploaded Source

File details

Details for the file axsi-0.0.2.tar.gz.

File metadata

  • Download URL: axsi-0.0.2.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for axsi-0.0.2.tar.gz
Algorithm Hash digest
SHA256 bd831e46d73771bb1d9d98a7b2d4fda49b013e8a6d492207fffc92f45a555157
MD5 e3a212afc9f4a249f8006b4be09d020d
BLAKE2b-256 6612adf640b0689257e8e2cc19dbb4997865bb56d2074a3561eb7d0e78e71c2f

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