The number of directions of a particular diffusion dataset after running import_dicom is not the same as I run dcm2niix from the terminal (i.e., the former is a subset of the latter). Is there any way I could fix this issue?
Any help would be greatly appreciated. Thank you very much.
we have never encountered this, could you be maybe a bit more specific. For example, could you show all of the diffusion files that should be onboarded and tell us which ones are not getting onboarded.
For 1), all the dicom were converted to nii without any problem. But somehow for 2) only 41 directions were converted to nii, and for 3) only 21 directions were converted to nii.
Would you like me to upload the entire dicom here? If so, you can find it here.
Ed, can you please provide the manual dcm2niix commands that you said converted the files without issues. I will try reproducing this using your data sometime today.
It seems like that the version of dcm2niix that is used in the container has some issues with your input data. I tested the import by using the latest dcm2niix and it works better. It imported dMRI_dir98_PA and dMRI_dir99_AP without any issues. There are still some issues with dMRI_dir98_AP, theses seem like some kind of input data issues:
>> dcm2niix -f 210 -z y -b y /gpfs/gibbs/pi/n3/Studies/MBLab/jd_tests/dwi_study/sessions/009/dicom/210
Chris Rorden's dcm2niiX version v1.0.20220720 (JP2:OpenJPEG) (JP-LS:CharLS) GCC5.5.0 x86-64 (64-bit Linux)
Found 99 DICOM file(s)
Convert 55 DICOM as /gpfs/gibbs/pi/n3/Studies/MBLab/jd_tests/dwi_study/sessions/009/dicom/210/210 (140x140x92x55)
Note: B0 not the first volume in the series (FSL eddy reference volume is 10)
Convert 44 DICOM as /gpfs/gibbs/pi/n3/Studies/MBLab/jd_tests/dwi_study/sessions/009/dicom/210/210a (140x140x92x44)
Conversion required 20.405868 seconds (16.320000 for core code).
210 21 dMRI_dir98_AP 99 [TR 0.00, TE 0.00] 20220909_01 2022-09-09 10:04:51
WARNING: number of frames in nii does not match dicom information: 55 vs. 99 frames
WARNING: no slice number information, use qunex reslice manually to correct /gpfs/gibbs/pi/n3/Studies/MBLab/jd_tests/dwi_study/sessions/009/nii/211.nii.gz
WARNING: number of frames in nii does not match dicom information: 44 vs. 99 frames
WARNING: no slice number information, use qunex reslice manually to correct /gpfs/gibbs/pi/n3/Studies/MBLab/jd_tests/dwi_study/sessions/009/nii/212.nii.gz
ehui@ehui:/hdd/hui/projects/stroke_recovery/data$ dcm2niix -f %n_%d 009
Chris Rorden's dcm2niiX version v1.0.20171215 (OpenJPEG build) GCC7.3.0 (64-bit Linux)
Found 832 DICOM image(s)
slices stacked despite varying acquisition numbers (if this is not desired please recompile)
Warning: Saving 99 DTI gradients. Validate vectors (images are not axial slices).
Convert 99 DICOM as 009/RS_EH_006_009_dMRI_dir98_PA (140x140x92x99)
slices stacked despite varying acquisition numbers (if this is not desired please recompile)
Convert 488 DICOM as 009/RS_EH_006_009_rfMRI_REST_AP (104x104x72x488)
slices stacked despite varying acquisition numbers (if this is not desired please recompile)
Warning: Saving 100 DTI gradients. Validate vectors (images are not axial slices).
Convert 100 DICOM as 009/RS_EH_006_009_dMRI_dir99_AP (140x140x92x100)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_PA_FA (140x140x92x1)
slices stacked despite varying acquisition numbers (if this is not desired please recompile)
Warning: Saving 99 DTI gradients. Validate vectors (images are not axial slices).
Convert 99 DICOM as 009/RS_EH_006_009_dMRI_dir98_AP (140x140x92x99)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_AP_TENSOR_B0 (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir99_AP_ColFA (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_PA_ADC (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_SpinEchoFieldMap_AP (104x104x72x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_PA_ColFA (140x140x92x1)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 3 DICOM as 009/RS_EH_006_009_dMRI_dir98_PA_TRACEW (140x140x92x3)
Convert 2 DICOM as 009/RS_EH_006_009_dMRI_dir99_AP_TRACEW (140x140x92x2)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir99_AP_FA (140x140x92x1)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 3 DICOM as 009/RS_EH_006_009_dMRI_dir98_AP_TRACEW (140x140x92x3)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_AP_ADC (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_SpinEchoFieldMap_PA (104x104x72x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_AP_FA (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir99_AP_ADC (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_PA_TENSOR_B0 (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir99_AP_TENSOR_B0 (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_dMRI_dir98_AP_ColFA (140x140x92x1)
Convert 1 DICOM as 009/RS_EH_006_009_SpinEchoFieldMap_PAa (104x104x72x1)
Convert 1 DICOM as 009/RS_EH_006_009_T1w_MPR_ND (300x320x208x1)
Convert 1 DICOM as 009/RS_EH_006_009_T2w_SPC_ND (300x320x208x1)
Convert 1 DICOM as 009/RS_EH_006_009_T2w_SPC (300x320x208x1)
Convert 1 DICOM as 009/RS_EH_006_009_AAHead_Scout_64ch-head-coil (160x160x128x1)
Convert 1 DICOM as 009/RS_EH_006_009_T1w_MPR (300x320x208x1)
Convert 1 DICOM as 009/RS_EH_006_009_AAHead_Scout_64ch-head-coil_MPR_sag (162x162x5x1)
Convert 1 DICOM as 009/RS_EH_006_009_SpinEchoFieldMap_APa (104x104x72x1)
Convert 1 DICOM as 009/RS_EH_006_009_AAHead_Scout_64ch-head-coil_MPR_cor (162x162x3x1)
Convert 1 DICOM as 009/RS_EH_006_009_AAHead_Scout_64ch-head-coil_MPR_tra (162x162x3x1)
Conversion required 32.409452 seconds (6.827901 for core code).
Note that this is the version that I use: Chris Rorden's dcm2niiX version v1.0.20171215 (OpenJPEG build) GCC7.3.0 (64-bit Linux)
Yes, that is the workaround until we update dcm2niix (should be in the next QuNex release). Still not sure what is happening with dMRI_dir98_AP though.