Local Diffusion ALPS (LD-ALPS)

This page last updated 2025/09/09

Introduction

This provides a refactored, public‑facing implementation of the Local Diffusion Analysis Along the Perivascular Space (LD‑ALPS) post‑processing pipeline. It computes LD‑ALPS and related ALPS indices for each subject directory, with a robust command‑line interface, logging, and CSV export.

Motivation

ALPS indices are routinely used as an imaging proxy for perivascular (glymphatic) fluid dynamics, but the conventional “unrotated” computation is highly sensitive to head orientation during MRI acquisition. The accompanying manuscript shows that head pitch systematically biases unrotated ALPS, that vector‑registered ALPS reduces this bias, and proposes LD‑ALPS to further mitigate orientation dependence by using voxelwise local orthogonal diffusion directions within each ROI. In that study, LD‑ALPS displayed no association with head pitch and showed the strongest relation to MMSE (retaining significance after conditioning on mean diffusivity). [Citation forthcoming]

Installation

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install --upgrade pip
pip install numpy scipy scikit-learn nibabel

Download

Download the code here, and the original code used to produce the data in the manuscript here.

Expected inputs

For each subject directory (default prefix alps_) the following files are required:

Usage

Python new_alps_postprocessor_refactored.py /path/to/base_dir \
	--subject-prefix alps_ \
	--bvecs-rotated            # use eddy-rotated bvecs (default) \
	--no-bvecs-rotated         # use original bvecs instead \
	--eps 0.5                  # DBSCAN eps (radians) for V1 clustering \
	--min-samples 5            # DBSCAN min_samples \
	-o ld_alps_metrics.csv     # output CSV

Example:

python new_alps_postprocessor_refactored.py /data/ADNI_niis -vv -o results.csv

Output CSV columns

ColumnDescription
subjectSubject directory name
ALPS_overallMean of left and right ALPS
L_ALPS, R_ALPSHemispheric ALPS indices
{L,R}_{Association,Projection}_{x,i}Mean ADCs per ROI for axes X (glymphatic) and I (non‑glymphatic)

Method notes

Reproducibility & diagnostics

The CLI logs progress per subject and writes a CSV for downstream statistics. If you need QC plots or histograms, extend compute_ld_alps_for_subject to persist figures for proj_x/proj_i distributions.

Citing

Manuscript currently under review.

License

MIT