Skip to main content

License: GPL v3

SpinSight MRI simulator

SpinSight is an MRI simulator written in Python and created for educational puposes. It jointly visualizes the imaging parameters, the MRI pulse sequence, the k-space data matrix, and the MR image. These are updated in near real-time when the user changes parameters. The simulator is run as a web browser dashboard. The data is simulated from computational 2D phantoms in vector graphics format (SVG).

Running the Simulator

Install using pip:

pip install spinsight

Then run as a command line tool

spinsight

This serves SpinSight on the local host, so that the simulator can be run by navigating to localhost in the web browser. The same command line tool can be used to deploy the simulator on a local network, or on a web server (run spinsight -h for help). Be aware that several minutes are required upon loading a phantom for the first time.

Phantom construction

To create a new phantom, add a directory with the phantom name under spinsight/phantoms. This directory shall contain files with the same name as the directory. Two formats are supported:

A single .toml file

The file shall consist of a list of shapes (see Shepp-Logan_shapes.toml for reference). Each shape is assigned a tissue type which must be defined in the TISSUES dict in constants.py.

A pair of .toml and .svg files

The .toml file specifies a mapping from hexcolors to tissues (see brain.toml for reference). The tissues must be defined in the TISSUES dict in constants.py.

The specified .svg file must meet the following specifications:

  • All paths must be closed
  • All paths must have a fill color matching a hexcolor defined in the .toml file (this defines the tissue).
  • Only polygons are supported (not Bézier curves etc.)

Dependencies

See pyproject.toml, dependencies under heading [project].

How to cite

If you use this software in your research, please cite:

Berglund J, Jain K, Sousa JM, Hedman K, Fahlström M. “SpinSight – An educational open-source MRI simulator with joint visualization of pulse sequence, k-space, and MR image. In: Proceedings of the Annual Meeting of the International Society of Magnetic Resonance in Medicine, Honolulu 2025, pp. 1968.

License

SpinSight is distributed under the terms of the GNU General Public License. See LICENSE.md.

Contact Information

Johan Berglund, Ph.D.
Uppsala University Hospital,
Uppsala, Sweden
johan.berglund@akademiska.se


Copyright © 2021–2026 Johan Berglund.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spinsight-1.3.6.tar.gz (550.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spinsight-1.3.6-py3-none-any.whl (120.1 kB view details)

Uploaded Python 3

File details

Details for the file spinsight-1.3.6.tar.gz.

File metadata

  • Download URL: spinsight-1.3.6.tar.gz
  • Upload date:
  • Size: 550.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for spinsight-1.3.6.tar.gz
Algorithm Hash digest
SHA256 f678155589d685d89554038c5b43c053f07220f8dbea5288066c0a1ffb265d51
MD5 31958f92e791991a14f00af33f69a8cc
BLAKE2b-256 0d37c131abdbde419a4893be78fa8c4b359cd69235c05f1c3655fb6ffc1cacd1

See more details on using hashes here.

File details

Details for the file spinsight-1.3.6-py3-none-any.whl.

File metadata

  • Download URL: spinsight-1.3.6-py3-none-any.whl
  • Upload date:
  • Size: 120.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for spinsight-1.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 260bfa2eefc51196ed4d1d12d0587f53941218e8dbaf3de246023e0db74a16e8
MD5 f70b4c0ae11ebc2594376dfb1a887acf
BLAKE2b-256 97338275e3c5df2d5fd20b54edcd50824125b6f67af423d297aec581239f186e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.6 This release

2 files

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.3

2 files

1.2.0

2 files

1.1.9

2 files

1.1.8

2 files

1.1.7

2 files

1.1.5

2 files

1.0.15

2 files

1.0.14

2 files

1.0.13

2 files

1.0.12

2 files

1.0.11

2 files

1.0.10

2 files

1.0.9

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page