SpinDoctor

Diffusion MRI Simulation Toolbox in Julia

https://github.com/spindoctormri/spindoctor.jl

Science Score: 18.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary

Keywords

bloch-torrey diffusion finite-elements magnetization mri pde

Keywords from Contributors

finite-volume raytracer navier-stokes computational-fluid-dynamics differentiable-physics
Last synced: 6 months ago · JSON representation ·

Repository

Diffusion MRI Simulation Toolbox in Julia

Basic Info
Statistics
  • Stars: 17
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Topics
bloch-torrey diffusion finite-elements magnetization mri pde
Created about 5 years ago · Last pushed about 3 years ago
Metadata Files
Readme License Citation

README.md

Logo

SpinDoctor

| Documentation | Workflows | Code coverage | Quality assurance | | :-----------: | :-------: | :-----------: | :---------------: | | Stable Dev | Build Status | Coverage | Aqua QA |

This is a Julia implementation of the SpinDoctor toolbox. The original MATLAB toolbox can be found at https://github.com/SpinDoctorMRI/SpinDoctor.

Getting started

  1. The examples folder contains drivers showing how to create geometry and solve different problems.
  2. The input files for the drivers are found in the folder examples/setups, and define different models.
  3. Multiple neuron meshes are available from RealNeuronMeshes. These can be loaded in the file examples/setups/neuron.jl.
  4. See the documentation page for more details.

Gallery

Setup recipes

| Disks | Plates | Spheres | |:---------------------------------------------:|:---------------------------------------:|:-----------------------------------------:| | DiskSetup | PlateSetup | SphereSetup | | Cylinders | Slabs | Neuron | | CylinderSetup | SlabSetup | NeuronSetup |

Matrix formalism with Laplace eigenfunctions

Eigenfunctions

Spinning spindle spins in SpinDoctor

Spindle

The above graphic visualizes the real part of the magnetization as a z-displacement for the spindle neuron geometry 03b_spindle4aACC (extracted from NeuroMorpho). The gradient is a PGSE sequence in the x-direction. The magnetization was saved for 200 time steps, and the exported VTK sequence was visualized using ParaView.

Test new gradient sequences with live plotting

Gradient

Here the magnetization is shown in a dendrite branch during a three-dimensional gradient sequence.

About

SpinDoctor is a software package that performs numerical simulations of diffusion magnetic resonance imaging (dMRI) for prototyping purposes.

SpinDoctor can be used

  1. to solve the Bloch-Torrey partial differential equation (BTDPE) to obtain the dMRI signal (the toolbox provides a way of robustly fitting the dMRI signal to obtain the fitted Apparent Diffusion Coefficient (ADC));
  2. to solve the diffusion equation for the homogenized ADC (HADC) model to obtain the ADC;
  3. a short-time approximation formula for the ADC is also included in the toolbox for comparison with the simulated ADC;
  4. Compute the dMRI signal using a matrix formalism (MF) analytical solution based Laplace eigenfunctions.

The PDEs and Laplace eigenvalue decompositions are solved by P1 finite elements. The geometry recipes create surface triangulations that are passed to TetGen to perform the finite element mesh generation. For 2D geometries, as similar approach is used, with Triangle.

SpinDoctor has support for the following features:

  1. multiple compartments connected through permeable membranes, with different
    • initial spin densities,
    • diffusion tensors,
    • T2-relaxation, and
    • permeability coefficients for the BTPDE and MF (the HADC assumes negligible permeability);
  2. diffusion-encoding gradient pulse sequences, including
    • the pulsed gradient spin echo sequence (PGSE),
    • the double-PGSE,
    • the oscillating gradient spin echo (OGSE), and
    • custom three-dimensional pulse sequences g⃗(t) = (g_x(t), g_y(t), g_z(t));
  3. uniformly distributed gradient directions in 2D and 3D for high angular resolution diffusion imaging (HARDI).
  4. Live plotting utilities
  5. Export VTK snapshots or time series to visualize finite element magnetization fields in ParaView.

SpinDoctor also comes with a geometry generation module, allowing for

  1. multilayered spherical cells with a nucleus;
  2. multilayered disk and cylinder cells with a myelin layer;
  3. an extra-cellular space (ECS) enclosed in either a box, a convex hull, or a tight wrapping around the cells;
  4. stacks of plates or slab cells;
  5. deformation of canonical cells by bending and twisting.

In addition, a variety of neuron meshes is available, whose surface geometries were extracted from NeuroMopho.org. The neurons may also be enclosed in an extracellular space as described above.

How to cite us

If you use our software for research, please consider citing us. See CITATION.md for further details.

Owner

  • Name: SpinDoctorMRI
  • Login: SpinDoctorMRI
  • Kind: organization

Citation (CITATION.md)

# Citation

If you use our software for research, please consider citing us.


## SpinDoctor

The paper about SpinDoctor can be found at
[https://arxiv.org/abs/1902.01025](https://arxiv.org/abs/1902.01025):

```bibtex
@article{SpinDoctor,
  author  = {Jing-Rebecca Li and Van-Dang Nguyen and Try Nguyen Tran and Jan Valdman and Cong-Bang Trang and Khieu Van Nguyen and Duc Thach Son Vu and Hoang An Tran and Hoang Trong An Tran and Thi Minh Phuong Nguyen},
  doi     = {https://doi.org/10.1016/j.neuroimage.2019.116120},
  issn    = {1053-8119},
  journal = {NeuroImage},
  pages   = {116120},
  title   = {{SpinDoctor: A MATLAB toolbox for diffusion MRI simulation}},
  url     = {http://www.sciencedirect.com/science/article/pii/S1053811919307116},
  volume  = {202},
  year    = {2019}
}
```


## Neuron module

The following article describes the application of SpinDoctor to neuron geometries
(extracted from [NeuroMorpho](http://neuromorpho.org/)):

```bibtex
@article{NeuronModule,
  author   = {Chengran Fang and Van-Dang Nguyen and Demian Wassermann and Jing-Rebecca Li},
  doi      = {https://doi.org/10.1016/j.neuroimage.2020.117198},
  issn     = {1053-8119},
  journal  = {NeuroImage},
  keywords = {Bloch-Torrey equation, Diffusion magnetic resonance imaging, Finite elements, Monte-Carlo, Simulation, Neurons},
  pages    = {117198},
  title    = {Diffusion {MRI} simulation of realistic neurons with {SpinDoctor} and the {Neuron Module}},
  url      = {http://www.sciencedirect.com/science/article/pii/S1053811920306844},
  volume   = {222},
  year     = {2020}
}
```


## Matrix formalism

This article describes the matrix formalism approach combined with the finite element
method:

```bibtex
@article{MatrixFormalism,
  author  = {Li, Jing-Rebecca and Tran, Try and Nguyen, Van-Dang},
  doi     = {10.1002/nbm.4353},
  journal = {NMR in Biomedicine},
  month   = {07},
  pages   = {},
  title   = {Practical computation of the diffusion {MRI} signal of realistic neurons based on {Laplace} eigenfunctions},
  volume  = {33},
  year    = {2020}
}
```

This article describes the extension of the matrix formalism to permeable membranes:

```bibtex
@article{MatrixFormalismPermeability,
    author   = {Agdestein, Syver Døving and Tran, Try Nguyen and Li, Jing-Rebecca},
    doi      = {https://doi.org/10.1002/nbm.4646},
    eprint   = {https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/pdf/10.1002/nbm.4646},
    journal  = {NMR in Biomedicine},
    keywords = {Bloch-Torrey equation, diffusion MRI, finite elements, Laplace eigenfunctions, matrix formalism, permeability, simulation},
    month    = {11},
    pages    = {e4646},
    title    = {Practical computation of the diffusion MRI signal based on Laplace eigenfunctions: permeable interfaces},
    url      = {https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/abs/10.1002/nbm.4646},
    year     = {2021}
}
```

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 230
  • Total Committers: 5
  • Avg Commits per committer: 46.0
  • Development Distribution Score (DDS): 0.417
Top Committers
Name Email Commits
Syver Døving Agdestein s****a@i****m 134
Syver Døving Agdestein s****a@g****m 61
github-actions[bot] 4****]@u****m 20
CompatHelper Julia c****y@j****g 12
Syver Døving Agdestein 4****n@u****m 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 4
  • Total pull requests: 42
  • Average time to close issues: 2 days
  • Average time to close pull requests: 7 days
  • Total issue authors: 4
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.21
  • Merged pull requests: 40
  • Bot issues: 0
  • Bot pull requests: 30
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tapudodo (1)
  • agdestein (1)
  • JuliaTagBot (1)
  • fachra (1)
Pull Request Authors
  • github-actions[bot] (29)
  • agdestein (11)
  • tapudodo (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
juliahub.com: SpinDoctor

Diffusion MRI Simulation Toolbox in Julia

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 9.9%
Average: 28.0%
Stargazers count: 29.9%
Forks count: 33.3%
Dependent packages count: 38.9%
Last synced: 6 months ago