fat_proc_convert_dcm_dwis

Dear Afni group,

I have recently run into an issue with the fat_proc_convert_dcm_dwis. I have my DTI data in a folder (3 folders, 2 have ~65 dcm images, and one has 1 dcm image ~27MB). I have run the same command on another dataset, and that works completely fine, however when I run it on two other datasets, I get the same error message, and fat_proc_convert_dcm_dwis does not finish executing. Main error i get is “ls: cannot access ‘tmpdir_001/nnn.bvec’: No such file or directory” , and i do not find the nnn.bvec file in the directory either, so it does not exist. Any ideas on why this isn’t working?

armand@armand-HP-ENVY-x360-Convertible:~/Desktop/ABI006Day1$ fat_proc_convert_dcm_dwis -indir ~/Desktop/ABI006Day1/dwi/ -prefix DWI_
++ Found 1 directories from ‘-indir /home/armand/Desktop/ABI006Day1/dwi/’:
/home/armand/Desktop/ABI006Day1/dwi/
++ Checking /home/armand/Desktop/ABI006Day1/dwi/ for preexisting NIFTIs …
++ → OK, good, no competing NIFTIs in any DICOM directory.

++ Based on prefix, the output directory will be:
.
++ Based on prefix, the output prefix will be:
DWI_

++ Making working directory: ./_WORKING_convert_dcm_dwis_DWI

-----> STARTING fat_proc_convert_dcm_dwis ---->

This command:
fat_proc_convert_dcm_dwis -indir /home/armand/Desktop/ABI006Day1/dwi/ -prefix DWI_

++ Echoing the command to: ./DWI__cmd.txt

++ OK, now converting dicoms from: /home/armand/Desktop/ABI006Day1/dwi/
Compression will be faster with /usr/local/bin/pigz
Chris Rorden’s dcm2niiX version v1.0.20170411 GCC5.4.0 (64-bit Linux)
Found 132 DICOM image(s)
Convert 66 DICOM as ./_WORKING_convert_dcm_dwis_DWI/tmpdir_001/nnn (128x128x66x1)
slices stacked despite varying acquisition numbers (if this is not desired please recompile)
Warning: DTI gradient directions only tested for axial (transverse) acquisitions. Please validate bvec files.
Convert 65 DICOM as ./_WORKING_convert_dcm_dwis_DWI/tmpdir_001/nnna (128x128x66x65)
Conversion required 7.682311 seconds (7.680303 for core code).
++ Found 1 sets of DTI data in ./_WORKING_convert_dcm_dwis_DWI
Organizizing now.
ls: cannot access ‘tmpdir_001/nnn.bvec’: No such file or directory

Hi, Bit-Warrior–

So the program will take as “-indir AAA” the name of a directory AAA/ containing only DWI dicoms, or the name of a directory AAA/ containing directories that each has only DWI dicoms.

From what you describe your input directory as containing, is it possible that the directory with “one dcm image ~27MB” does not contain DWI data? That might be why the function is having problems looking for a bvec file-- there isn’t one.

If AAA/ has subdirectories of only DWI-dicom directories, then you should be able run something like the following to convert all of them into a single nifti+grad file:


fat_proc_convert_dcm_dwis -indir "AAA" -prefix OUTDIR/OUTPREF

If AAA/ has subdirectories of several types of directories (not an optimal situation…), then you should be able run something with wildcard/globbing to convert just the DWI-bearing ones into a single nifti+grad file (note the need for quotation marks here):


fat_proc_convert_dcm_dwis -indir "AAA/DWI_DIRS_0*" -prefix OUTDIR/OUTPREF

–pt

Hey Ptaylor,

Thanks for your reply. I asked the MRI tech who gave me the data, and she confirmed that it is a DTI sequence. However, i removed the file from the directory just in case, and ran the same command. Again I get the same error message.
I have run the same command on another dataset which had the same layout as the one I am currently running.

last time i had issues with the PATH and this is what my .cshrc looks like:
set path=( $path /home/armand/abin )
setenv PATH /home/armand/TORTOISE_V3.1.0/DIFFPREPV31/bin/bin:$PATH
setenv PATH /home/armand/TORTOISE_V3.1.0/DIFFCALC/DIFFCALCV31:$PATH
setenv PATH /home/armand/TORTOISE_V3.1.0/DRBUDDIV31/bin:$PATH

any suggestions?

Hi, Armand-

Well, nothing there seems inherently problematic to me.

Would you want to upload the directories in question, and I can take a look? I just PMed you the instructions for uploading.

–pt

… and, to note for anyone with fat_proc* questions following this thread, it should be noted that the present issue is resolved: it turns out that two of the directories did not contain DWI-acquisition dicoms, and therefore there were conversion errors for this specific function (which looks for supplementary files like bvec and bval created by dcm2niix_afni).

–pt