Dear experts,
I am sorry for all the questions. I have several datasets processing different things so different errors are occurring simultaneously.
I am analyzing the NKI dataset at the moment and running into errors with dwifslpreproc.
my commands:
######## COMMANDS ########
echo "Converting NIFTI to mif"
time mrconvert -json_import ${rawDTI_dir}/sub-A000${subject}_ses-BAS1_dwi.json -fslgrad ${rawDTI_dir}/sub-A000${subject}_ses-BAS1_dwi.bvec ${rawDTI_dir}/sub-A000${subject}_ses-BAS1_dwi.bval ${rawDTI_dir}/sub-A000${subject}_ses-BAS1_dwi.nii.gz ${dir_out}/preprocessed/dwi_${subject}.mif
echo "Denoising and Unringing"
time dwidenoise ${dir_out}/preprocessed/dwi_${subject}.mif ${dir_out}/preprocessed/dwi_${subject}_denoised.mif
time mrdegibbs ${dir_out}/preprocessed/dwi_${subject}_denoised.mif ${dir_out}/preprocessed/dwi_${subject}_denoised_unringed.mif #-axes list, select the slice axes (default: 0,1 - i.e. x-y).
echo "Eddy correction"
time dwifslpreproc ${dir_out}/preprocessed/dwi_${subject}_denoised_unringed.mif ${dir_out}/preprocessed/dwi_${subject}_denoised_unringed_eddy.mif -scratch /ifs/loni/groups/matherlab/shai/NKI/Scripts/tmpDIR/ -nocleanup -rpe_header -eddy_options " --slm=linear --data_is_shelled"
the error:
dwifslpreproc: Changing to scratch directory (/path/tmpDIR/dwifslpreproc-tmp-FQ9DVO/)
Command: mrconvert dwi.mif - | dwiextract - se_epi.mif -bzero
dwifslpreproc: [WARNING] DWI header indicates no phase encoding contrast between b=0 images; proceeding without inhomogeneity field estimation
Function: posix.remove('se_epi.mif')
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 eddy_in.nii -strides -1,+2,+3,+4 -export_grad_fsl bvecs bvals -export_pe_eddy eddy_config.txt eddy_indices.txt
dwifslpreproc: [ERROR] mrconvert dwi.mif eddy_in.nii -strides -1,+2,+3,+4 -export_grad_fsl bvecs bvals -export_pe_eddy eddy_config.txt eddy_indices.txt (dwifslpreproc:898)
dwifslpreproc: [ERROR] Information from failed command:
dwifslpreproc:
mrconvert: [ERROR] Phase-encoding matrix requires 4 columns to convert to eddy format
I am not sure why this keeps happening, as this step has not been an issue with other datasets.
In the tmpDir, I see:
-bash-4.1$ mrinfo dwi.mif
************************************************
Image name: "dwi.mif"
************************************************
Dimensions: 106 x 90 x 64 x 137
Voxel size: 2 x 2 x 2 x 2.4
Data strides: [ -1 2 3 4 ]
Format: MRtrix
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 0 -0 -104
0 1 -0 -81.42
-0 0 1 -51.81
ConversionSoftware: dcm2niix
ConversionSoftwareVersion: v1.0.20170411 GCC4.3.2
EchoTime: 0.0850000009
EffectiveEchoSpacing: 0.000690002984
FlipAngle: 90
ImageType: ORIGINAL
[6 entries] PRIMARY
...
ND
MOSAIC
MagneticFieldStrength: 3
Manufacturer: Siemens
ManufacturersModelName: TrioTim
PhaseEncodingDirection: j-
ProcedureStepDescription: RESEARCH_colcombe
ProtocolName: DIFF_137_AP
RepetitionTime: 2.4000001
ScanningSequence: EP
SequenceName: ep_b5
SequenceVariant: SK_MTC
SeriesDescription: DIFF_137_AP
command_history: mrconvert -json_import /path/sub-x_ses-BAS1_dwi.json -fslgrad path//sub-x_ses-BAS1_dwi.bvec /path//sub-x_ses-BAS1_dwi.bval /path//sub-x_ses-BAS1_dwi.nii.gz /path/dwi_x.mif (version=3.0.2)
dwidenoise /path/dwi_x.mif /path/dwi_x_denoised.mif (version=3.0.2)
mrdegibbs /path/dwi_x_denoised.mif /path//dwi_x_denoised_unringed.mif (version=3.0.2)
path/mrtrix3_fsl/bin/mrconvert /path/dwi_x_denoised_unringed.mif /path/dwi.mif -json_export /path/dwifslpreproc-tmp-7FX0MA/dwi.json (version=3.0.2)
comments: TE=85;Time=101833.648;phase=1;dwell=0.690
dw_scheme: 0.5773502692,-0.5773502692,0.5773502692,5
[137 entries] -0.9999964445,0,0.002666641185,1500
...
-0.3654368189,0.1927519045,-0.9106605486,1495
-0.2564740874,-0.8533932908,0.4538071547,1505
-bash-4.1$ mrinfo eddy_in.nii
************************************************
Image name: "eddy_in.nii"
************************************************
Dimensions: 106 x 90 x 64 x 137
Voxel size: 2 x 2 x 2 x 2.4
Data strides: [ -1 2 3 4 ]
Format: NIfTI-1.1
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 0 -0 -104
0 1 -0 -81.42
-0 0 1 -51.81
comments: TE=85;Time=101833
mrtrix_version: 3.0.2
Thanks in advance.