help > RE: I'm unable to correctly use dcm2nii code
Aug 11, 2017 06:08 PM
McGovern Institute for Brain Research. MIT
RE: I'm unable to correctly use dcm2nii code
You can directly import dcm files into CONN (actually CONN will handle the conversion automatically). If you prefer to manually convert them, you may use the syntax:
to convert one DCM run into a single 4d nifti file.
Hope this helps
Originally posted by Mir Jeong:
Hello. I'm having difficulty on the seemingly simple task of converting dcm files to nii files.
I'm using Bash on Ubuntu on Windows.
My Windows version is Windows 10 Pro.
I have i796951.MRDC.1 ~ i796951.MRDC.166 files
I want to convert these dcm? image into nii format so that I can start image processing.
However, the command doesn't work the same way as my intuition.
When I entered the following command, it didn't work. (nothing happened)
Even though the instructions appear when using dcm2nii command,
I don't clearly understand as I was unable to find concrete examples of the usage.
eternal@DESKTOP-UNTM4IS:~/c9image/NDARAF706DLN$ dcm2nii -v s796950
Chris Rorden's dcm2nii :: 4AUGUST2014 (Debian) 64bit BSD License
reading preferences file /home/eternal/.dcm2nii/dcm2nii.ini
0 /usr/bin/dcm2nii ERROR: unable to find
Either drag and drop or specify command line options:
-4 Create 4D volumes, else DTI/fMRI saved as many 3D volumes: Y,N = Y
-a Anonymize [remove identifying information]: Y,N = Y
-b load settings from specified inifile, e.g. '-b C:\set\t1.ini'
-c Collapse input folders: Y,N = Y
-d Date in filename [filename.dcm -> 20061230122032.nii]: Y,N = Y
-e events (series/acq) in filename [filename.dcm -> s002a003.nii]: Y,N = Y
-f Source filename [e.g. filename.par -> filename.nii]: Y,N = N
-g gzip output, filename.nii.gz [ignored if '-n n']: Y,N = Y
-i ID in filename [filename.dcm -> johndoe.nii]: Y,N = N
-m manually prompt user to specify output format [NIfTI input only]: Y,N = Y
-n output .nii file [if no, create .hdr/.img pair]: Y,N = Y
-o Output Directory, e.g. 'C:\TEMP' (if unspecified, source directory is used)
-p Protocol in filename [filename.dcm -> TFE_T1.nii]: Y,N = Y
-r Reorient image to nearest orthogonal: Y,N
-s SPM2/Analyze not SPM5/NIfTI [ignored if '-n y']: Y,N = N
-t Text report (patient and scan details): Y,N = N
-v Convert every image in the directory: Y,N = Y
-x Reorient and crop 3D NIfTI images: Y,N = N
You can also set defaults by editing /home/eternal/.dcm2nii/dcm2nii.ini
EXAMPLE: dcm2nii -a y /Users/Joe/Documents/dcm/IM_0116
When I enter the code below, I get the same error as above.
eternal@DESKTOP-UNTM4IS:~/c9image/NDARAF706DLN$ dcm2nii -4 s796950
I would appreciate it if someone knows the correct way of using the dcm2nii code to convert dcm files to nii format.
I've heard that there are also dcm2niigui and also the matlab versions
I can't seem to use dcm2niigui since I'm using Linux command line.
I would appreciate it if someone knows how to use dcm2niigui on Bash on Ubuntu on Linux.
|I'm unable to correctly use dcm2nii code||Mir Jeong||Aug 9, 2017|
|RE: I'm unable to correctly use dcm2nii code||Alfonso Nieto-Castanon||Aug 11, 2017|