Julia implementation of subspace reconstruction for accelerated high-resolution diffusion-weighted MRI.
This repository contains the reconstruction framework developed for accelerated 3D diffusion MRI of the ex vivo mouse brain.
Two strategies are implemented to estimate the subspace basis:
- Simulation-based basis: generated from a dictionary of diffusion tensor signals with different eigenvalues and orientations.
- Calibration-based basis: estimated directly from the fully sampled central region of the k-space.
The subspace reconstruction is performed with the Berkeley Advanced Reconstruction Toolbox (BART) using wavelet regularization.
The reconstruction pipeline includes:
- Reading Bruker diffusion MRI acquisitions.
- Conversion of the acquisition to the reconstruction format.
- Initial reconstruction for phase estimation.
- Correction of inter-volume phase variations.
- Generation or calibration of the subspace basis.
- Coil sensitivity estimation.
- Subspace reconstruction using BART.
- Projection of the reconstructed subspace coefficients back into the diffusion-volume domain.
PAPER_subspace_DWI/
|-- src/
| |-- Subspace_DWI.jl
| |-- bruker_sequence.jl
| |-- build_basis.jl
| `-- subspace_reconstruction.jl
|-- Project.toml
|-- Manifest.toml
`-- README.md
The main source files contain:
bruker_sequence.jl: Bruker acquisition handling and conversion.build_basis.jl: diffusion signal simulation and subspace basis generation.subspace_reconstruction.jl: simulation-based and calibration-based subspace reconstruction.Subspace_DWI.jl: main Julia module.
The package is developed in Julia and relies mainly on:
MRIReco.jlMRIFiles.jlMRICoilSensitivities.jlBartIO.jlLinearAlgebra
The Berkeley Advanced Reconstruction Toolbox (BART) must also be installed separately and accessible from Julia.
For example:
using BartIO
set_bart_path("/path/to/bart")Clone the repository:
git clone https://github.com/CRMSB/PAPER_subspace_DWI.git
cd PAPER_subspace_DWIStart Julia and activate the project:
using Pkg
Pkg.activate(".")
Pkg.instantiate()The package can then be loaded with:
using Subspace_DWIThe simulation-based approach generates a dictionary of diffusion-weighted signals using the diffusion tensor model:
where:
- S(g) is the diffusion-weighted signal measured along gradient direction g;
- S_0 is the signal without diffusion weighting;
- b is the diffusion-weighting factor;
- g is the diffusion gradient direction;
- D is the diffusion tensor;
A set of diffusion tensors is generated by varying:
- the tensor eigenvalues;
- the principal diffusion direction over a hemisphere;
- the orientation of the secondary eigenvectors around the principal axis.
For each simulated tensor:
where
The simulated signal dictionary is decomposed using singular value decomposition (SVD), and the dominant right singular vectors are retained to construct the temporal subspace basis.
basis = build_basis(
bruker_path,
n_bases,
n_angles,
b_value,
lambda_min,
lambda_step,
lambda_max,
subspace_dim,
)where:
n_basescontrols the number of principal diffusion directions;n_anglescontrols the number of orientations around each principal direction;lambda_min,lambda_step, andlambda_maxdefine the sampling of tensor eigenvalues;subspace_dimdefines the number of retained basis vectors.
The simulation-based reconstruction uses the subspace basis generated with the build_basis function described above.
basis = build_basis(
bruker_path,
n_bases,
n_angles,
b_value,
lambda_min,
lambda_step,
lambda_max,
subspace_dim,
)The resulting basis is then provided to the reconstruction function:
subspace_coefficients, reconstructed_images =
subspace_reconstruction_simulation(
bruker_path,
basis,
iterations,
regularization,
)The input arguments are:
bruker_path: path to the prospectively undersampled Bruker dataset;basis: simulated subspace basis generated withbuild_basis;iterations: number of BART PICS reconstruction iterations;regularization: wavelet regularization parameter used during the subspace reconstruction.
The reconstruction is performed in the reduced subspace domain using BART PICS with spatial wavelet regularization.
The reconstructed subspace coefficients are subsequently projected back into the original diffusion-volume domain.
The function returns:
subspace_coefficients: reconstructed coefficient images in the reduced subspace representation;reconstructed_images: reconstructed diffusion volumes in the original diffusion-volume domain.
The calibration-based approach estimates the temporal subspace directly from the acquired data.
A fully sampled central region of k-space is extracted and reconstructed at low spatial resolution before the subspace reconstruction. The resulting diffusion volumes are used to build a calibration dictionary, from which the temporal subspace basis is estimated using singular value decomposition (SVD).
Unlike the simulation-based approach, the subspace basis is therefore generated internally from the calibration data rather than provided as an input. Consequently, the number of retained basis vectors, n_basis, is specified directly in the reconstruction function.
The reconstruction is performed as follows:
subspace_coefficients, reconstructed_images =
subspace_reconstruction_calibration(
bruker_path,
center_size,
n_basis,
iterations,
regularization,
)The input arguments are:
bruker_path: path to the prospectively undersampled Bruker dataset;center_size: size of the fully sampled central k-space region used to generate the calibration data;n_basis: number of basis vectors retained from the SVD of the calibration dictionary;iterations: number of BART PICS reconstruction iterations;regularization: wavelet regularization parameter used during the subspace reconstruction.
Once the basis has been estimated from the central k-space data, the full undersampled dataset is reconstructed in the reduced subspace domain using BART PICS with spatial wavelet regularization.
The function returns:
subspace_coefficients: reconstructed coefficient images in the reduced subspace representation;reconstructed_images: reconstructed diffusion volumes in the original diffusion-volume domain.
A global phase correction is applied across diffusion volumes before subspace reconstruction.
The phase difference between each diffusion volume and the reference volume is estimated from a reference voxel located arbitrarily at the center of the reconstructed volume. The corresponding phase offset is then removed from the k-space data.
This reference selection provides a simple initial strategy for compensating for inter-volume phase variations. Its robustness should nevertheless be further evaluated, and a more dedicated phase-estimation method could be implemented in future developments.
The subspace reconstruction relies on the BART PICS framework.
The current reconstruction uses wavelet regularization with:
pics -S -e -R W:7:0:<regularization>
The number of iterations and the regularization strength are specified by the user.
Coil sensitivity maps are estimated using BART ecalib.
The reconstruction functions return:
subspace_coefficients, reconstructed_imageswhere:
subspace_coefficientscontains the reconstructed coefficient images in the reduced subspace representation;reconstructed_imagescontains the diffusion volumes reconstructed in the original diffusion-volume domain.
The Julia dependencies required by the project are defined in Project.toml.
To reproduce the software environment:
using Pkg
Pkg.activate(".")
Pkg.instantiate()Raw Bruker acquisitions are not distributed directly through this repository.
An example dataset is available on Zenodo and can be used to reproduce the reconstruction workflow described in this repository:
https://zenodo.org/records/22751780
The dataset includes:
- Bruker dataset
10: fully sampled reference acquisition. - Bruker dataset
15: prospectively undersampled acquisition with an acceleration factor ofAF = 12.
A complete reconstruction example using these datasets is provided in the examples folder.
If you use this code in your work, please cite the associated publication:
N. Simonneau et al. Accelerated high-resolution diffusion MRI of the ex vivo mouse brain using subspace reconstruction. Manuscript in preparation.
Citation information will be updated following publication.
Nicolas Simonneau Centre de Résonance Magnétique des Systemes Biologiques (CRMSB) University of Bordeaux
License information will be added before public release.