Giter VIP home page Giter VIP logo

mrtwin_pulseq's Introduction

MRTwin_pulseq

MRTwin sequence programming and simulation framework

MRTwin is a tool to code sequences manually and simulate MR images using the included Bloch simulation. The Documentation/Script of the course is in /script. It covers A : basic echoes in 1D, B : gradient echo encoding and fast GRE MRI, C : spin echo and RARE, D : balanced SSFP, E : exporting and scanning at a real MRI system, F : non-cartesian trajectories, undersampling and reconstruction.

Course setup

The course format is full time two weeks. We meet daily from 9:30 am to 5:30 pm (CET). The first week is very interactive, with small inputs, and interleaved exercises and discussion of them. The second week is more independent.

For virtual attendence read the README_VIRTUAL.md.

Installation

Check the readmes for your system:

  • README_HOME.md for installation on your own Windows or Linux system, Mac is currently not supported.
  • README_CIP.md for the installation in the FAU CIP pool.
  • run script data/brainweb/generate_maps.py to generate brainweb phantoms

Check the installation

See if you can run the python files ex/ex_help_01 and ex/exB05. If errors occur check the versions of the required packages. Or get help from the admin.

A brief introduction in python and torch.

We use python in here as it is open source and easy to debug and extend. Also with pytorch python provides a rather simple possibility of parallelization of code, auto-differentiation.

If you are not familiar with python, please make sure to understand the file ex_help01_python.py from the MRTwin code, as it covers most of the used functions in the whole code and course.

Resources

  • Python: Programming language
  • Pulseq: Open-source, vendor agnostic MRI sequence definition
  • pyPulseq: Pulseq port to python
  • pyTorch: Tensor computations with automatic differentiation and GPU acceleration
  • Bloch Simulator: Visualization Tool (this repository contains an extension for Pulseq files)
  • LaTeX: Used for the script of the course
  • mrzero-core.readthedocs

mrtwin_pulseq's People

Contributors

asd2511 avatar dabosch avatar fglang avatar j-endres avatar larsh957 avatar mzaiss avatar tholtus avatar zhengguotan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mrtwin_pulseq's Issues

See the effect of a slice profile with a 3D phantom.

I would like to use the simulation software to understand what is the effect of my sequence on the slice profile, more specifically, I would like to understand what is the effective slice thickness for a sync RF pulse which I designed.

In order to do so, I would need a 3D phantom.

Would it be possible with MRTwin to do that?

Looking forward to hear from you

Best
Tiago

Improvements 2024_03

  • fix timing of SE and RARE solutions!

  • directly switch to 30 and 60 degree in RARE nospoilers

  • fix export files with number of coils etc.

  • -seq = pp.Sequence() to -seq = pp.Sequence(system) everywhere!, removd grad_raster 50 us also everywhere

  • add T2', D, B0, B1 standard to numerical brain_cropped

  • check image orientation in all NUFFT files

  • if possible, put all in mr0.util, not util extra

  • maybe here kspace = torch.reshape((signal), (Nphase, Nread)).clone().t(), generally use Nphase,Nphase*adc.samples?

  • some solution or ex had still a 90 degree pulse instead of 5 or otherwaz round

  • E files check (FOV, sim + meas + RARE energy), last rare STE and FLASH works

  • eg sol F01: -space = np.flip(np.swapaxes(space, -1, -2), -2) +space = np.flip(space, -1)

  • make fft consistent in all ex and all sol

  • fix the dk/ mismatch, pretty much every recon has linear phase due to this! I think this could be put in the rewinder just add 0.5 here later this is 0.5/fov

  • rf spoiling everywhere to 84 in playground

  • in exported E01 E02 i added flair pulses, but the seq was not yet reorderd

  • in scipy nufft, linear interpolation method worked better

Wrong sign in equation 19 in the script

As we discussed yesterday in MRI sequence programming: One of the signs of the exponent of equation 19 or 20 should be positive. We concluded it should be the one in equation 19, as it represents an inverse Fourier transform :)

MRI together todos

  • cleanup exercises and solutions
  • make a quickstart file / doc for simulating a seq file
  • proofread abstarct + keep word limit
  • name all resources in the readme (pypulseq, pulseq, blochsimweb, ...
  • link release notes and version of this to the main source 2.1.x??
  • make a MRItogether tag/release

Improvements SS23

match wheel names in readme

ifft shift instead of fft shift

ifftshift
ifft
fftshift

exB04 line 136, change subplot to 321

fix timing of SE and RARE

fix export files with number of coils etc.

E files check
(FOV, sim + meas + RARE energy)

last rare STE and FLASH works

Solution exF03_simple_undersampled_CS

Hello there,

There seems to be something wrong with the solution file for exF03_simple_undersampled_CS. There is no convergence of the reconstruction. I am just running the file as provided by the GitHub Repo, am I missing something?

Improvements BlochSimWeb

  • stationary and rotating frame (??) - Lars Hanson
  • gy gradients are not yet played out correctly,,
  • gx gradients are not matching between sim and display (no rotation when gradiient is >0
  • normalize RF and gradients by largest value of the whole seq file - inhomogeneity
  • Can you add 3 load buttons: 1. Load seq, 2. load seq x3 3.load seq x10 - or an extra speed button
  • File I/O only works in chrome, not in firefox
  • refresh or restart button to have same settings but stop the se file
  • problem with 180° in RARE 16 example
  • flickering B1 arrow , Torque arrow, by updating (check integrated sinc pulses )
  • add light grey background in upper plot when ADC is on
  • add a virtual pixel phantom (pixel close to center and pixel close to edge)
  • test all settings ( equilibrium, plane)

License

The build tool / dependency used to build the pre-pass as a python module is licensed under Apache-2.0. This license requires a copy of the license itself, as well as a copyright notice.
All other pre-pass dependencies are MIT, which may or may not require the same.

We don't need to include any copyright notices for python libraries like torch, matplotlib, numpy, etc... as this repository doesn't include them directly but the user has to download them (via pip / conda install ...)
But when distributing a compiled pre-pass .wheel, the parts of the dependencies are included in the binaries. Not as source code, but compiled, which still seems to require to include the Apache license. (Not too sure about MIT, doesn't read like it but I'm not a lawyer).

tl;dr:

We should include the Licenses and copyright-notices for all dependencies of the pre-pass in a pre-pass/licenses folder, just to be on the save side.

cargo license output:

(MIT OR Apache-2.0) AND Unicode-DFS-2016 (1): unicode-ident
Apache-2.0 (5): pyo3, pyo3-build-config, pyo3-ffi, pyo3-macros, pyo3-macros-backend
Apache-2.0 OR MIT (23): autocfg, bitflags, cfg-if, indoc, libc, lock_api, once_cell, parking_lot, parking_lot_core, proc-macro2, quote, scopeguard, smallvec, syn, unindent, windows-sys, windows_aarch64_gnullvm, windows_aarch64_msvc, windows_i686_gnu, windows_i686_msvc, windows_x86_64_gnu, windows_x86_64_gnullvm, windows_x86_64_msvc
Apache-2.0 WITH LLVM-exception (1): target-lexicon
MIT (1): redox_syscall

Improvements for the Tutorial

  • RARE was to complicated / fast: probably better to start from scratch with echo train and encoding
  • Export to scanner: coil combination - better adaptive combine already in get_signal, to have quasi single channel data with phase.
  • Bug in RARE with slice selection gradients
  • Bug in RARE for inhom B1 - requires ne prepass form JE
  • provide starter files for all exercises
  • in the RARE solution still the pixel phantom was loaded

CIP

  • new torch version as standard library for module load python
  • add torchvision package

add link to
https://github.com/markus-nilsson/mri-simulator

spin echo shows an artifact.

for rare the wrong obj was loaded

extract from obj T2 and so on is missing

ex files at least empty ones are helpful

fft loop was missing in enciding exs

phase images from real not working
syncronize the E files so they run for scanner and sim the dame way

platform independence

windows not always works
grafik

need to check different pythinsm pips etc. to be clear about the dependencies

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.