A complete Quantitative Susceptibility Mapping (QSM) pipeline that runs entirely in your web browser using WebAssembly. No installation, no backend servers, no data uploads — just pure client-side MRI processing.
- Completely Private: All processing happens locally in your browser — your data never leaves your computer
- Zero Installation: No Python, MATLAB, or specialized software required
- Cross-Platform: Works on Windows, macOS, Linux, and even mobile devices
- Interactive: Real-time visualization with NiiVue, adjustable contrast, and masking thresholds
- Portable: Static files can be hosted anywhere (GitHub Pages, local server, etc.)
- Comprehensive: 20+ algorithms covering the complete QSM pipeline
QSMbly's QSM algorithms are provided by QSM.rs, a standalone Rust library compiled to WebAssembly. See the QSM.rs README for a complete list of supported algorithms with citations.
- Visit qsmbly.neurodesk.org
- Upload DICOM files or NIfTI magnitude/phase images
- Set acquisition parameters (Echo Time, Field Strength)
- Run the pipeline
git clone https://github.com/astewartau/qsmbly.git
cd qsmbly
./run.sh
# Open http://localhost:8080- Install Rust: https://rustup.rs/
- Install wasm-pack:
cargo install wasm-pack
# Standard build (maximum browser compatibility)
./build.sh
# SIMD-accelerated build (faster, requires modern browsers)
./build.sh --simd
# Start development server
./run.shThe --simd flag enables 128-bit SIMD vectorization for faster processing of iterative algorithms. This provides approximately 2-4x speedup for element-wise operations.
| Browser | Minimum Version |
|---|---|
| Chrome | 91+ (May 2021) |
| Firefox | 89+ (June 2021) |
| Safari | 16.4+ (March 2023) |
| Edge | 91+ (May 2021) |
npm install
npm testqsmbly/
├── index.html # Main application interface
├── build.sh # WASM build script
├── run.sh # Development server
├── test.sh # Rust test runner
├── js/
│ ├── qsm-app-romeo.js # Main application logic
│ ├── qsm-worker-pure.js # Web worker for pipeline execution
│ ├── app/
│ │ └── config.js # Centralized configuration
│ ├── controllers/ # UI controllers (file I/O, pipeline, viewer, etc.)
│ ├── modules/ # UI modules (NIfTI utils, masking, viewer)
│ └── workers/ # Web workers (DiCompare)
├── css/
│ └── modern-styles.css # Application styling
├── wasm/ # Compiled WebAssembly (served to browser)
├── rust-wasm/ # WASM binding layer
│ ├── Cargo.toml # Depends on qsm-core
│ └── src/lib.rs # Thin wasm_bindgen wrappers (59 exports)
├── dcm2niix/ # DICOM-to-NIfTI conversion (WASM)
├── schemas/ # DiCompare validation schemas
├── niivue/ # NiiVue neuroimaging viewer
└── nifti-js/ # NIfTI reader (JavaScript)
- QSM.rs: Core QSM algorithms (Rust, compiled to WebAssembly)
- wasm-bindgen: JavaScript/WASM interop
- NiiVue: WebGL neuroimaging viewer
- dcm2niix: DICOM conversion (WASM build)
- Pyodide: Python in browser (for DiCompare validation)
This project is licensed under the MIT License — see the LICENSE file for details.
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions