Images are disrupted after dwifslpreproc

Dear MRtrix3 experts,

I recently started preprocessing diffusion tensor images using MRtrix3.
Converting .nii to .mif, denoising, and removing Gibbs artifacts went smoothly and all of the created images seemed intact (I checked it many times).
However, after the process with “dwifslpreproc”, several slices disappeared from a certain volume in each image (subj_ID.mif, subj_ID_den.mif, subj_ID_den_unr.mif) like the attached file (this is just a screenshot of the disrupted image, but of course I can provide you with the very images that are now in problem). I have no idea what happened, as there is no indication that the file has been modified, nor has the file size changed. Also, the created subj_ID_den_unr_preproc.mif image was defective because the entire brain disappeared from a certain volume.

Does anyone have an idea to understand the reason why this error happen? Also, how can I deal with this problem and take the next step?

Sincerely,
Izumi

Here is the log;

Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ pwd
/Volumes/K12005BU/DTI/mrtrix_test2
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ mrconvert subj_07001.nii subj_07001.mif -fslgrad subj_07001.bvec subj_07001.bval
mrconvert: [100%] copying from “subj_07001.nii” to “subj_07001.mif”
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ mrview subj_07001.mif
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ mrview subj_07001.mif
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ dwidenoise subj_07001.mif subj_07001_den.mif -noise subj_07001_noise.mif
dwidenoise: [100%] preloading data for “subj_07001.mif”
dwidenoise: [100%] running MP-PCA denoising
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ mrview subj_07001_den.mif
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ mrcalc subj_07001.mif subj_07001_den.mif -subtract subj_07001_residual.mif
mrcalc: [100%] computing: (subj_07001.mif - subj_07001_den.mif)
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ mrview subj_07001_residual.mif
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ mrdegibbs subj_07001_den.mif subj_07001_den_unr.mif
mrdegibbs: [100%] performing Gibbs ringing removal
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ dwifslpreproc subj_07001_den_unr.mif subj_07001_den_unr_preproc.mif -pe_dir PA -rpe_none -eddy_options" --slm=linear"
Error: unrecognized arguments: -eddy_options --slm=linear
Usage: dwifslpreproc input output [ options ]
(Run dwifslpreproc -help for more information)
Izumi-no-iMac:mrtrix_test2 izumimatsudaira$ dwifslpreproc subj_07001_den_unr.mif subj_07001_den_unr_preproc.mif -pe_dir PA -rpe_none -eddy_options " --slm=linear"
dwifslpreproc:
dwifslpreproc: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
dwifslpreproc:
dwifslpreproc: Generated scratch directory: /Volumes/K12005BU/DTI/mrtrix_test2/dwifslpreproc-tmp-Z51JUA/
Command: mrconvert /Volumes/K12005BU/DTI/mrtrix_test2/subj_07001_den_unr.mif /Volumes/K12005BU/DTI/mrtrix_test2/dwifslpreproc-tmp-Z51JUA/dwi.mif -json_export /Volumes/K12005BU/DTI/mrtrix_test2/dwifslpreproc-tmp-Z51JUA/dwi.json
dwifslpreproc: Changing to scratch directory (/Volumes/K12005BU/DTI/mrtrix_test2/dwifslpreproc-tmp-Z51JUA/)
dwifslpreproc: Total readout time not provided at command-line; assuming sane default of 0.1
Command: mrinfo dwi.mif -export_grad_mrtrix grad.b
Command: dwi2mask dwi.mif - | maskfilter - dilate - | mrconvert - eddy_mask.nii -datatype float32 -strides -1,+2,+3
Command: mrconvert dwi.mif -import_pe_table dwi_manual_pe_scheme.txt eddy_in.nii -strides -1,+2,+3,+4 -export_grad_fsl bvecs bvals -export_pe_eddy eddy_config.txt eddy_indices.txt
Command: eddy_cuda7.5 --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --slm=linear --out=dwi_post_eddy --verbose
dwifslpreproc: CUDA version of ‘eddy’ was not successful; attempting OpenMP version
Command: eddy --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --slm=linear --out=dwi_post_eddy --verbose
Command: mrconvert dwi_post_eddy.nii.gz result.mif -strides -1,2,3,4 -fslgrad dwi_post_eddy.eddy_rotated_bvecs bvals
Command: mrconvert result.mif /Volumes/K12005BU/DTI/mrtrix_test2/subj_07001_den_unr_preproc.mif
dwifslpreproc: Changing back to original directory (/Volumes/K12005BU/DTI/mrtrix_test2)
dwifslpreproc: Deleting scratch directory (/Volumes/K12005BU/DTI/mrtrix_test2/dwifslpreproc-tmp-Z51JUA/)

Hi Izumi,

Generally the first step in such instances is to run the script with the -nocleanup option, step through the images in the order in which they are generated (log.txt in that directory), and see where the cropping first arises.

One possibility is that there has been an erroneous estimate of motion for a volume, which results in eddy attempting to pull data from outside of the image FoV when correcting that volume; when that happens, eddy zero-fills the voxel across all volumes. But when this happens it tends to not be perfectly aligned with the image axis.

Outright corruption of the image is also a possibility. Could plausibly happen if you’re processing very high resolution data and writing to a file system that does not support files above a certain size (e.g. an external FAT32 HDD); from your terminal printout quoting paths at /Volumes/..., it’s a possibility.

Otherwise, you can experiment; e.g. downsample the data by a factor of 2 and re-run dwifslpreproc; try running the same data on a different system if possible; anything that can provide evidence for what may or may not be the case.

Rob