Skip to content

Koma is a Pulseq-compatible framework to efficiently simulate Magnetic Resonance Imaging (MRI) acquisitions. The main focus of this package is to simulate general scenarios that could arise in pulse sequence development.

License

Notifications You must be signed in to change notification settings

Stockless/KomaMRI.jl

Β 
Β 

Repository files navigation

KomaMRI.jl is a Julia package for highly efficient ⚑ MRI simulations. KomaMRI was built from the ground up to be: easy to use, extensible, cross-platform, and powered by open-source community standards.

Features:
  • Fast simulations with CPU/GPU parallelization πŸƒπŸ’¨
  • Extensible, so anyone can include new features πŸ†™
  • Supports community-standards 🀝
  • Interactive visualizations using PlotlyJS.jl πŸ“²
  • Cross-platform (Windows, Mac & Linux) 🌐
  • Friendly GUI (using web technologies) 😌
  • Compatible with modern notebooks 🎈
  • Flexible API for advanced users πŸ‘¨β€πŸ’»
Packages Stable Version Build Status Code Coverage Downloads
πŸ“¦ KomaMRI.jl
β”” πŸ“¦ KomaMRIBase.jl
β”” πŸ“¦ KomaMRICore.jl
β”” πŸ“¦ KomaMRIFiles.jl
β”” πŸ“¦ KomaMRIPlots.jl

Table of Contents

News

☰ Roadmap

v1.0:

  • Phantom and Sequence data types,
  • Spin precession in gradient-only blocks (simulation optimization),
  • GPU acceleration using CUDA.jl,
  • RF excitation,
  • GPU accelaration of RF excitation,
  • Scanner data-type: , etc.,
  • Pulseq IO,
  • Signal "Raw Output" dictionary (ISMRMRD),
  • MRIReco.jl for the reconstruciton,
  • Documentation,
  • Auxiliary Pulseq functions,
  • Coil sensitivities,
  • Cardiac phantoms and triggers.
  • decay,

Next:

  • Diffusion models with Laplacian Eigen Functions,
  • Magnetic susceptibility,
  • Use PackageCompiler.jl to build a ditributable core or app.

Installation

To install, just type ] add KomaMRI in the Julia REPL or copy-paste the following into the Julia REPL:

pkg> add KomaMRI
pkg> add CUDA     # Optional: Install desired GPU backend (CUDA, AMDGPU, Metal, or oneAPI)

For more information about installation instructions, refer to the section Getting Started of the documentation.

First run

KomaMRI.jl features a convenient GUI with predefined simulation inputs (i.e. Sequence, Phantom, and Scanner). To launch the GUI, use the following command:

using KomaMRI
using CUDA        # Optional: Load GPU backend (default: CPU)
KomaUI()

Press the button that says "Simulate!" to do your first simulation :). Then, a notification will emerge telling you that the simulation was successful. In this notification, you can either select to (1) see the Raw Data or (2) to proceed with the reconstruction.

Important

Starting from KomaMRI v0.9 we are using package extensions to deal with GPU dependencies, meaning that to run simulations on the GPU, installing (add CUDA/AMDGPU/Metal/oneAPI) and loading (using CUDA/AMDGPU/Metal/oneAPI) the desired backend will be necessary (see GPU Parallelization and Tested compatibility).

How to Contribute

KomaMRI exists thanks to all our contributors:

Want to be highlighted here? We welcome contributions from the community! If you're interested in contributing, please read our Contribution Guidelines for details on how to get started.

How to Cite

If you use this package, please cite our paper.

Plain Text:

Castillo-Passi, C, Coronado, R, Varela-Mattatall, G, Alberola-LΓ³pez, C, Botnar, R, Irarrazaval, P. KomaMRI.jl: An open-source framework for general MRI simulations with GPU acceleration. Magn Reson Med. 2023; 1- 14. doi: 10.1002/mrm.29635

BibTex:

@article{https://doi.org/10.1002/mrm.29635,
         author = {Castillo-Passi, Carlos and Coronado, Ronal and Varela-Mattatall, Gabriel and Alberola-LΓ³pez, Carlos and Botnar, RenΓ© and Irarrazaval, Pablo},
         title = {KomaMRI.jl: An open-source framework for general MRI simulations with GPU acceleration},
         journal = {Magnetic Resonance in Medicine},
         keywords = {Bloch equations, GPU, GUI, Julia, open source, simulation},
         doi = {https://doi.org/10.1002/mrm.29635},
         url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/mrm.29635},
         eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/mrm.29635},
}

Tested compatibility

All parallel backends are tested on Linux (besides Apple silicon) using the latest stable release, Julia 1 (stable), and Julia 1.9 (compat).

KomaMRICore CPU GPU (Nvidia) GPU (AMD) GPU (Apple) GPU (Intel)
Julia 1.10
Julia 1

Single-threaded compatibility is tested in all major operating systems (OS).

KomaMRI CPU (single-threaded)
Julia 1.10 (Windows)
Julia 1.10 (Linux)
Julia 1.10 (Mac OS)
Julia 1 (Windows)
Julia 1 (Linux)
Julia 1 (Mac OS)

If you see any problem with this information, please let us know in a GitHub issue.

About

Koma is a Pulseq-compatible framework to efficiently simulate Magnetic Resonance Imaging (MRI) acquisitions. The main focus of this package is to simulate general scenarios that could arise in pulse sequence development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 94.6%
  • HTML 3.6%
  • CSS 1.7%
  • JavaScript 0.1%