Combines two lists of linear transforms with the deformation field map obtained typically after the SDC process. Additionally, computes the corresponding bspline coefficients and the map of determinants of the jacobian.
Perform some de-spiking filtering to clean up the edge of the fieldmap (copied from fsl_prepare_fieldmap)
A function that averages the b0 volumes from a DWI dataset.
Warning
b0 should be already registered (head motion artifact should be corrected).
Computes readout time from epi params (see eddy documentation).
Warning
params['echospacing'] should be in sec units.
Rotates the input bvec file accordingly with a list of parameters sourced from eddy, as explained here.
Writes an image containing only the volumes with b-value specified at input
Selects the reference and moving volumes from a dwi dataset for the purpose of HMC.
Recompose back the dMRI data accordingly the b-values table after EC correction
Insert identity transformation matrices in b0 volumes to build up a list
Checks reorientations of in_dwi w.r.t. old_dwi and reorients the in_bvec table accordingly.
Rotates the input bvec file accordingly with a list of matrices.
Note
the input affine matrix transforms points in the destination image to their corresponding coordinates in the original image. Therefore, this matrix should be inverted first, as we want to know the target position of \vec{r}.