open-discussion > Convert DICOM to NIFTI.
Showing 1-4 of 4 posts
May 24, 2017 06:05 AM | Gyan Raj Koirala
Convert DICOM to NIFTI.
Hello,
I tried to convert DICOM file to NIFTI using MRIcon through the dcm2nii application in the following steps:
1. Make a different folder having all (256) dicom files.
2. Select all (256) the dicom files to dcm2nii.
After a brief processing, it results three .nii.gz files as follows:
20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
co20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
o20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
Is this process okay?
Now, I would like to process the NIFTI (nii.gz) file using BrainSuite for source reconstruction but I am not quite sure on which file should I compute source reconstruction.
Please suggest me.
Thanks in advance.
I tried to convert DICOM file to NIFTI using MRIcon through the dcm2nii application in the following steps:
1. Make a different folder having all (256) dicom files.
2. Select all (256) the dicom files to dcm2nii.
After a brief processing, it results three .nii.gz files as follows:
20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
co20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
o20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
Is this process okay?
Now, I would like to process the NIFTI (nii.gz) file using BrainSuite for source reconstruction but I am not quite sure on which file should I compute source reconstruction.
Please suggest me.
Thanks in advance.
Jun 1, 2017 12:06 AM | Chris Rorden
RE: Convert DICOM to NIFTI.
You can inspect the images to see what is going on:
1.) The original T1-scan is saved
20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
2.) Presumably, this is a 3D image acquired in sagittal orientation. The data is losslessly rotated to the nearest orthogonal orientation to support viewers that ignore the spatial transformation matrix.
o20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
3.) The software detects that there are excess slices of the neck that could disrupt normalization, so a cropped version is created
co20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
(1) and (2) are identical for tools that support the NIfTI spatial transforms. (3) often works better for tools that assume your image has roughly the same amount of neck as the template images. I am not familiar with BrainSuite, but if the output of (3) passes visual inspection I would think it is your best choice.
While I hope my old software is robust and mature, I would suggest you upgrade to dcm2niix (which comes with MRIcroGL).
1.) The original T1-scan is saved
20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
2.) Presumably, this is a 3D image acquired in sagittal orientation. The data is losslessly rotated to the nearest orthogonal orientation to support viewers that ignore the spatial transformation matrix.
o20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
3.) The software detects that there are excess slices of the neck that could disrupt normalization, so a cropped version is created
co20130204_17443618NSFUSBRAINPREOPs1000a1001.nii.gz
(1) and (2) are identical for tools that support the NIfTI spatial transforms. (3) often works better for tools that assume your image has roughly the same amount of neck as the template images. I am not familiar with BrainSuite, but if the output of (3) passes visual inspection I would think it is your best choice.
While I hope my old software is robust and mature, I would suggest you upgrade to dcm2niix (which comes with MRIcroGL).
Dec 18, 2017 08:12 PM | egalv002 - 21st Century Medicine
RE: Convert DICOM to NIFTI.
Hi Chris,
I am a beginner teaching myself how to view .dcm files. I have about 80 files in .dcm format and when I drag and drop them onto dcm2nii, I only get 10 files in nii format. What happened to the rest of the .dcm files? I don't understand what happened. Also, I have browed youtube in hopes of finding some tutorials. Are you aware of any tutorials that may be available to speed up the process?
I am a beginner teaching myself how to view .dcm files. I have about 80 files in .dcm format and when I drag and drop them onto dcm2nii, I only get 10 files in nii format. What happened to the rest of the .dcm files? I don't understand what happened. Also, I have browed youtube in hopes of finding some tutorials. Are you aware of any tutorials that may be available to speed up the process?
Dec 20, 2017 12:12 PM | Chris Rorden
RE: Convert DICOM to NIFTI.
Many DICOM systems save each 2D slice as a single file. Others,
(e.g. Siemens Mosaic format) save each 3D image from a 4D time
series as a separate file. On the other hand, NIfTI expects all 2D
slices to be stacked as a single 3D file (and optionally all 3D
volumes in a fMRI/DTI dataset as a single 4D dataset). Therefore,
it is common to have fewer NIfTI images than DICOM images.
You can find some of my tutorials here
http://www.mccauslandcenter.sc.edu/crnl/psyc589888
I would strongly encourage you to heed the warning you see whenever you run dcm2nii: consider upgrading to dcm2niix. You can get dcm2niix as a standalone tool
https://github.com/rordenlab/dcm2niix/releases
or with MRIcroGL (providing the graphical control from the "Import" menu:
https://github.com/neurolabusc/MRIcroGL
A verbose manual is here
https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage
You can find some of my tutorials here
http://www.mccauslandcenter.sc.edu/crnl/psyc589888
I would strongly encourage you to heed the warning you see whenever you run dcm2nii: consider upgrading to dcm2niix. You can get dcm2niix as a standalone tool
https://github.com/rordenlab/dcm2niix/releases
or with MRIcroGL (providing the graphical control from the "Import" menu:
https://github.com/neurolabusc/MRIcroGL
A verbose manual is here
https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage