GithubHelp home page GithubHelp logo

qspacesampling2ge's Introduction

Q-Space-Sampling to GE

This script allows you to convert a samples.txt file generated from the Emmanuel Caruyer's web application to a tensorXXX.dat file you can use for DTI sequences on a GE MRI System.

Disclaimer

As usual it's "AS IS" and for research only !

Please read the Tests part of this README carefully.

Cite

Please kindly cite the following relevant article when you use the sampling scheme :

Emmanuel Caruyer, Christophe Lenglet, Guillermo Sapiro, Rachid Deriche. Design of multishell sampling schemes with uniform coverage in diffusion MRI. Magnetic Resonance in Medicine, Wiley, 2013, 69 (6), pp. 1534-1540. http://dx.doi.org/10.1002/mrm.24736

Usage

This installation was tested on a SIGNA Premier system (RX29.1).

Download your sample scheme from the Emmanuel Caruyer's web application Get the script and the file samples.txt to your home directory and open a terminal.

Generate the tensorXXX.dat from the samples.txt file (here with an example of 64 directions and 3 shells) :

python qspacesampling2ge.py samples.txt tensorXXX.dat 3000 2000 1000

Copy and rename the tensorXXX.dat to /usr/g/bin/ (be careful to not erase previously existing tensor files) :

ls -l /usr/g/bin/tensor*
cp tensorXXX.dat /usr/g/bin/tensor666.dat

In a DTI sequence :

  • Set the number of direction to the number you setup in the Q-space-sampling scheme
  • Set the b-value to the maximum b-value of your shell

Diffusion-setup

  • use the advanced panel to setup the tensor file number.

Advanced-setup

Tests

This script was tested on a 3T MRI SIGNA PREMIER system (MR29.1).

Using the same sampling described in the Usage section, here is the results of the comparison of the bvec/bval files obtained after converting the DICOM using dcm2niix and the original samples.txt file.

The results are given by the tests/test.py script (run it in the tests directory)

You can use this script with your own schemes like that :

python test.py --help
python test.py --samples samples.txt --bvec dcm2niix_nifti.bvec --bval dcm2niix_nifti.bval --bvalues 1000 2000 3000

samples.txt is the file download from the Q-Space-Sampling web app. bvec/bval files are the ones created by dcm2niix when converting your dicom to nifti. The script need to know the expected b-values you setup. It will skip the bvec/bval for any b=0.

X coordinate sign

The u_x given by the sampling scheme and the x coordinate obtained in the bvec file are reversed in sign. I choose to flip the sign of the x coordinate in the script to correct this.

Rounding problems

There are some case where the b-values is slightly off. It's probably because of rounding values. Vectors coming from the q-space-sample app do not always have a norm of exactly 1. I choose to rescale the norm of the vector before generating the GE file and it seems that works.

Please check carefully the DICOM outputs if you use this script.

qspacesampling2ge's People

Contributors

naveau avatar

Watchers

Kikuko Kaneko avatar

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.