A practical framework for translating offline MR reconstructions to inline deployment, built on the open-source Gadgetron platform.
If you use this framework in your research, please cite:
Ning Z, et al. From offline to inline without pain: A practical framework for translating offline MR reconstructions to inline deployment using the Gadgetron platform. Magn Reson Med. 2026. https://doi.org/10.1002/mrm.70304
- Converts ISMRMRD raw data into a Twix-like structure for minimal modification of existing offline code
- Provides a general-purpose MATLAB-based input converter and customizable ParameterMap covering commonly used headers
- Enables long custom reconstructions without interrupting the MR exam flow
- Inline reconstructions are executed asynchronously on an external server
- Supports retrieval scans and retro-reconstruction
- Scanner-native reconstructions are preserved for early review
- Allows inline reconstructions to access shared or external input scans (e.g., reference coils)
- Includes built-in GPU monitoring and queueing
- Schedules jobs intelligently across multi-GPU servers to avoid overloads
- Enables scanner-based post-processing (e.g., bias field and distortion correction) on custom reconstructions
- Ensures visual consistency with Siemens-reconstructed images
Gadgetron_Parallel_Framework/
│
├── ParameterMap/ # Metadata mapping (Twix → ISMRMRD)
├── config/ # Gadget chain configuration files (*.xml)
├── matlab_handle_archive/ # MATLAB handlers for "Read & Save" and background recon
├── Gadgetron_tools/ # Input converters, Twix-like wrappers, utilities
├── Bash_script/ # Headless / queued job launchers
├── Useful_tools/ # Misc tools: ISMRMRD readers, resource monitors, etc.
├── SENSE_Recon_Demo/ # Demo: SENSE (offline + inline)
├── AlignSENSE_Recon_Demo/ # Demo: AlignSENSE (offline + inline)
├── radial_NUFFT_Demo/ # Demo: NUFFT recon for radial sequence (offline + inline)
- Gadgetron
- MATLAB ≥ R2021a with Gadgetron Toolbox
- CUDA-enabled Conda environment (for launching recon scripts)
- Linux server with NVIDIA GPUs
- Siemens scanner with ICEGadgetron integration
All setup instructions and tutorials are available at Wiki of this repo
Or see: 👉 User Manual on Notion
Inline implementations included:
-
SENSE:
SENSE_Recon_Demo/- Reference: Pruessmann KP et al., SENSE: Sensitivity Encoding for Fast MRI. MRM 1999. DOI:10.1002/mrm.1910420526
Figure 1. SENSE reconstruction results of a SWI sequence using the inline demo script
-
AlignSENSE:
AlignSENSE_Recon_Demo/- Reference:
- L. Cordero-Grande, et al., Sensitivity Encoding for Aligned Multishot Magnetic Resonance Reconstruction. IEEE Transactions on Computational Imaging, 2016. DOI: 10.1109/TCI.2016.2557069
- L. Cordero-Grande, et al., Motion-corrected MRI with DISORDER: Distributed and incoherent sample orders for reconstruction deblurring using encoding redundancy. MRM. 2020. DOI: 10.1002/mrm.28157
- Reference:
Figure 2. AlignSENSE reconstruction results of a MPRAGE sequence using the inline demo script. (A) before MoCo; (B) after MoCo via AlignSENSE
Figure 3. AlignSENSE reconstruction results of a SWI sequence using the inline demo script. (A) before MoCo & using auto-calibration lines for coil sensitivity estimation; (B) after MoCo via AlignSENSE & using auto-calibration lines; (C) before MoCo & using an external reference for coil sensitivity estimation and reconstruct to a lager FOV (wrapping removed compared to A); (D) after MoCo via AlignSENSE & using an external reference
- radial NUFFT:
radial_NUFFT_Demo/- Reference: Blunck Y, et al., 3D-multi-echo radial imaging of 23 Na (3D-MERINA) for time-efficient multi-parameter tissue compartment mapping. MRM, 2018. DOI: 10.1002/mrm.26848
Figure 4. NUFFT reconstruction results of a multi-echo GRE Sodium imaging sequence with radial trajectory using the inline demo script for three views (A,D, axial; B,E, sagittal; C,F, coronal; A-C, first echo; D-F, second echo)
Each demo contains:
- Offline version
- Inline version (
inline/subfolder) diff/subfolder showing minimal modifications for inline adaptation
The demo datasets (raws) can be downloaded at Zenodo: 👉 demo datasets at Zenodo
Validated on:
-
3T MAGNETOM Vida (XA60) — tested with MPRAGE, FLAIR, SWI
-
7T MAGNETOM Terra X (XA60) — tested with multi-echo radial GRE
-
TwinsUK cohort study on 3T MAGNETOM Vida - applied on MPRAGE
- N = 480 subjects
- 99% successful inline retrieval rate (via retrieval scans or retro-recon)
This project is released under the MIT License.



