-
Notifications
You must be signed in to change notification settings - Fork 0
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
Get bvec / bval in FSL format and mrtrix format #14
Comments
I need to do more test and to check with different data but it seems that currently in mri_conv the bvec are always provided with respect to the image axes, not in real or scanner coordinates (so like the FSL format) |
Hi @manuegrx, If you have an algorithm or code that allows to generate real bvec/bval FSL, I can integrate it into mri_conv. |
Hi @montigno ! I'll be out of the office for 2 weeks but when I come back I'm available to work together on this subject ! I will first create a small database with data for each format/ each constructor and test with dcm2niix and mrtrix to know exactly what we need to have for each format (mrtrix and fsl) |
very good idea !! |
I began to gather some data and to compare mri_conv / dcm2niix and mrtrix. Here are some first comments:
@montigno I am available to discuss about this |
As discussed with @montigno yesterday the priority is to change the code for Philips (DICOM and PAR/REC) and brucker data in order to have both fsl format and mrtrix format. The main modifications to do are:
In a second time, it will be great to add correct tag for Siemens and GE. It is a little be more complicated as it will be necessary to change the way to get the tag depending on the manufacturer/ type of DICOM. For GE it will be necessary to add a "correction" to have the bvec in FSL format. Here is a quick table with the different tags used for bvec/ bval (filled with dcm2niix info and with test data) :
|
Hi @manuegrx, Great for the table ! I did not have time to modify mri_conv for the conversions of bevcs/bvals into FSL or MrTrix format. I will watch all this after November 15. See you soon ! |
Hi @manuegrx, You will find in the 'devpt' branch, a beta version of mri_conv. To be continued ! See you soon |
Hi @montigno ! Thank you, I tested a little bit the devpt branch! It seems fine for DICOM Philips:
However, the devpt branch does not working with PAR/REC. No bvec/bval/mrtrix bvec bval files are created. It is as if mri_conv had not detected that this was diffusion data. It works with the same PAR/REC in the master version. |
Hi @manuegrx, Effectively, it could not calculate the bvecs for fsl. It needs the rotation matrix calculated with the angles ap, fh and rl from PARREC. The axes of this matrix depend on the image type (sagittal, coronal or axial). To find the right axes, I will stick to the dicoms, so I will need the PARREC and Dicom from the same sequence, I have some of them, but if you also have them that would be good.. To be continued ! See you soon |
Okay it explains why the .bvec and .bval files (in FSL format) are not present :) But in my test the "-bvecs-bvals-MRtrix.txt" (in MRTRIX format) is also not created. As it is what it was already done before (and as it is correct) , I think we should keep it ! |
Hi @manuegrx, You will find in the 'devpt' branch, an other beta version of mri_conv (24.1.1a) I will need Dicom and Philips of the same sequence To be continued ! See you soon |
Hi @montigno , Thank you, it works well ! |
@montigno I will ask if I can have the same sequence in DICOM and PAR/REC, I let you know |
As explain here, mri_conv allows to obtain bvec and bval in one file in MRTRIX format (if the option is check, a bvecs/bvals text file with a '-bvecs-bvals-MRtrix' suffix and a '.txt' extension is created) for DICOM (Philips and Brucker).
If we used the option "save bvecs & bvals in 2 files", one file is created for bval and an other for the bvec. Following my request the extension of the file have been change to .bvec and .bval (see 0e1ed59) in order to be similar to FSL format.
However in this case it is not in FSL format but is is still as in MRTRIX format because in FSL format the gradient vectors should be provided with respect to the image axes, not in real or scanner coordinates (as it is the case for MRTRIX format) !
We can find the differences between the two format here but the main features are the following:
MRTRIX format : a single ASCII text file with one row per DWI volume (a row = x y z b where [ x y z ] are the components of the gradient vector, and b is the b-value in units of s/mm²) AND the direction vectors are assumed to be provided with respect to real or scanner coordinates (same convention as for DICOM)
FSL format: a pair of ASCII text files (bval file = a one row with one b value per DWI volume; bvec file = 3 rows of space-separated floating-point values, with first row = x-component, second row = y-component, and third row = z-component). The gradient vectors are provided with respect to the image axes, not in real or scanner coordinates
If we import BIDS format in mri_conv, the bvec/bval imported are in FSL format.
It could be nice if mri_conv allows to have both MRTRIX format and FSL format when we import DICOM (and PARE_REC but I did not tested yet).
If it is not possible to get FSL format for now, maybe we could change a little be the documentation to make things clearer !
The text was updated successfully, but these errors were encountered: