History of AFNI updates  

|
August 21, 2018 11:45AM
Hi, Bit-Warrior-

Lots of things to unpack here.

1) OK, I will address some features of DIFFPREP, but just usage. From their help file:
--dwi 
          Full path to the DWI NIFTI image to be corrected. Only provide this if a 
          LISTFILE is not provided. Bmatrix and phase parameters also need to be entered. 

     --bvecs 
          Full path to the Bvecs file. Only provide this if a LISTFILE is not provided. 
          DWI NIFTI and phase parameters also need to be entered. 

     --bvals 
          Full path to the Bvals file. Only provide this if a LISTFILE is not provided. 
          DWI NIFTI and phase parameters also need to be entered.

---> these are basically the 3 files that would be output by dcm2niix (or dcm2niix_afni, if you want the same thing distributed with AFNI). These files have the following specific format:
++ The DWI file is 4D NIFTI, having N volumes.
++ The "bvecs" file is 3 rows, each of N entries, for the x-, y- and z- components of the gradient. Each gradient *should* be stored here as a unit-magnitude value. This would be a "row"-gradient file, or row-vec file.
The "bvals" file is a single row of N bvalues. Typically, the first one (and possibly others) have a zero value. Others can/will be larger numbers like ~1000 (because typical units of DW factors are s/mm^2).

For more information/description on these things, the 1dDW_Grad_o_Mat++ help file has a number of comments/descriptions, and the following part FATCAT help in the AFNI documentation does, too:
[afni.nimh.nih.gov]

2) the TORTOISE-style bmatrix is 6 columns by N rows, with the order of columns described in both of the above documentations. The bmatrix info combines the gradient and bvalue (magnitude) information, storing essentially the bmatrix element values.

3a) Re. converting the Siemens grad table:
Thanks for putting that there. Note that the Siemens grad table mostly looks like a "column-wise" list of grads, but important it has commas (!) in it. That is different than what AFNI (or TORTOISE, or several other softwares) would be happy to read in. You would want to delete the commas (e.g., replace them with spaces), and *then* you could convert that to a row-wise gradient file, such as with:
1dDW_Grad_o_Mat++                                \
    -in_col_vec  gradfile_nocommas_cvec.dat      \
    -out_row_vec gradfile_nocommas_rvec.dat
The input has unit magnitude grads, and so does the output. The output would be your "bvecs" file.

3b) Note that the Siemens grad table does not appear to contain b-value information-- it just has unit-magnitude grads. Fine. You would have to provide a file of bvalues, which I guess you would have to know. Note that you likely have some b-values that are zero, and then many that are nonzero.

4) You can read the above links for how the bvec and bval information combine. Something to note is taht sometimes the "reference scans" entries have a non-zero gradient value but a zero b-value. Other times, there is a non-zero bvalue, but the gradient components are all zero. Sometimes, both the bvalue is zero *and* all grad componetns are zero. Each of those cases describes having an un-weighted reference scan.

OK, please let me know if that has addressed everything.

--pt
Subject Author Posted

1dDW_Grad_o_Mat++ and DIFFPREP

bit-warrior August 21, 2018 10:42AM

Re: 1dDW_Grad_o_Mat++ and DIFFPREP

ptaylor August 21, 2018 11:01AM

Re: 1dDW_Grad_o_Mat++ and DIFFPREP

bit-warrior August 21, 2018 11:21AM

Re: 1dDW_Grad_o_Mat++ and DIFFPREP

ptaylor August 21, 2018 11:45AM