Hi all, I’ve been following the single-tissue CSD tutorial on Mrtrix3 readthedocs. I finished running dwifslpreproc on a subject with rpe_all, and I am now trying to run dwibiascorrect on the output of dwifslpreproc (“dwi_preprocessed_fixed.mif”). However when I run dwibiascorrect with ANTS, I get this error:
dwiextract in.mif - -bzero | mrmath - mean mean_bzero.mif -axis 3
Command: mrconvert mean_bzero.mif mean_bzero.nii -strides +1,+2,+3
Command: mrconvert mask.mif mask.nii -strides +1,+2,+3
Command: N4BiasFieldCorrection -d 3 -i mean_bzero.nii -w mask.nii -o [corrected.nii,init_bias.nii] -s 4 -b [100,3] -c [1000,0.0]
Command: mrcalc mean_bzero.mif mask.mif -mult - | mrmath - sum - -axis 0 | mrmath - sum - -axis 1 | mrmath - sum - -axis 2 | mrdump -
Command: mrcalc corrected.nii mask.mif -mult - | mrmath - sum - -axis 0 | mrmath - sum - -axis 1 | mrmath - sum - -axis 2 | mrdump -
Traceback (most recent call last):
File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/intel2016.4/mrtrix/3.0_RC3/bin/dwibiascorrect", line 138, in <module>
run.command('mrcalc ' + init_bias_path + ' ' + str(output_integral / input_integral) + ' -mult ' + bias_path)
ZeroDivisionError: float division by zero.
I also tried with the FSL option, but I get another error:
dwibiascorrect -fsl dwi_preprocessed.mif dwi_preprocessed_unbiased.mif
dwibiascorrect:
dwibiascorrect: 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.
dwibiascorrect:
dwibiascorrect: [WARNING] Use of -fsl option in dwibiascorrect script is discouraged due to its strong dependence on initial brain masking, and its inability to correct voxels outside of this mask.Use of the -ants option is recommended for quantitative DWI analyses.
dwibiascorrect: Generated temporary directory: /scratch/ahan/hcpa/HCA6000030_V1_MR/dwibiascorrect-tmp-THH2R7/
Command: mrconvert /scratch/ahan/hcpa/HCA6000030_V1_MR/dwi_preprocessed.mif /scratch/ahan/hcpa/HCA6000030_V1_MR/dwibiascorrect-tmp-THH2R7/in.mif
dwibiascorrect: Changing to temporary directory (/scratch/ahan/hcpa/HCA6000030_V1_MR/dwibiascorrect-tmp-THH2R7/)
Command: dwi2mask in.mif mask.mif
Command: dwiextract in.mif - -bzero | mrmath - mean mean_bzero.mif -axis 3
Command: mrcalc mean_bzero.mif mask.mif -mult - | mrconvert - mean_bzero_masked.nii -strides -1,+2,+3
Command: fast -t 2 -o fast -n 3 -b mean_bzero_masked.nii
dwibiascorrect:
dwibiascorrect: [ERROR] Command failed: fast -t 2 -o fast -n 3 -b mean_bzero_masked.nii
Any help is greatly appreciated!