Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce mrtrix (grad) and FSL (bval/bvec) style output files for DWI data #40

Closed
gdevenyi opened this issue May 1, 2018 · 4 comments
Closed

Comments

@gdevenyi
Copy link
Contributor

gdevenyi commented May 1, 2018

The current outputs are nice, but most people's first step is probably to feed into a program that expects certain formats.

For mrtrix you just add the bvals as another column after the vectors.
https://mrtrix.readthedocs.io/en/latest/concepts/dw_scheme.html

For FSL, it uses the insane format:
bvecs

x1 x2 x3 ... xn
y1 y2 y3 ... yn
z1 z2 z3 ... zn

bvals

b1 b2 b3 b4 b5 ... bn

https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FDT/UserGuide

@SebastianoF
Copy link
Owner

Thanks for raising this issue.

No matter the efforts, flags and options, an interface between the converted data and the subsequent intended analysis that the user would like to perform will always be needed.

As you said every software for the subsequent analysis has different requirements.

For that reason the converter stops one step before data analysis, and tries to explain how the data were converted: if I start customise for particular subsequent analysis, the problem is when do I stop?

You can load the b-vals and b-vect and then transpose or concatenate according to your needs. You can do it both with Matlab (loading the .csv) or with python, loading the .npy.

Hope this help. Feel free to re-open the issue for further on this thread.

@gdevenyi
Copy link
Contributor Author

gdevenyi commented May 1, 2018

Thanks, I know how to produce and handle what I need, just suggesting the smoothest way possible less-than-technical users.

@neurolabusc
Copy link

@SebastianoF I just converted the DWI sample from bruker2nifti_qa and it creates the text files Lego_2_DwGradVec.txt and Lego_2_DwEffBval.txt. Your message above suggests that by simply transposing the row/columns the DwGradVec.txt will be in FSL format (as described here and here). I know that NIfTI uses different spatial coordinates than DICOM, but I am not sure about the raw Bruker data. I just want to make sure the vectors have been rotated to match the expectations of the popular FSL tools.

@SebastianoF
Copy link
Owner

In theory vectors have been rotated as expected, so you should have only to feed fsl with no permutations. In practice there are still some open issues on orientation that I did not manage to solve (see issues #11, #33), and some permutation of the b-vects columns may be required. To find confirmation, look at the anatomical regions that are expected to have a predominant direction (corpus callosum), and see if they match the expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants