Rank: 885 based on 158 downloads (last 30 days) and 1 file submitted
photo

Xiangrui Li

E-mail
Company/University
The Ohio State University

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Xiangrui
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Jul 2014 Screenshot DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li dicom, nifti, siemens, mri, ge, philips 158 11
  • 5.0
5.0 | 1 rating
Comments and Ratings by Xiangrui View all
Updated File Comments Rating
27 Jan 2014 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li

Hi Paul,
Thank you for the comments and suggestions.

Now the missing file check is not as strict as before. For Philips data, this check is skipped due to the possible sparse instance numbering. For other vendors, missing files at beginning is allowed now.

The bug in save_dti_para is fixed.

The converter can deal with dicom files without meta info now.

Cheers.

-Xiangrui

21 Nov 2013 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li

Hi JuanesA89,
The error means number of slices extracted by the code is not a single number, which is odd. If you don't mind, you can send me one of your dicom files, or dicom header of a file returned by hdr = dicm_hdr(dicmFileName).

-Xiangrui

15 Nov 2013 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li

Hi Qingyan,
I just did an update last night, and it may be available sometime today. I believe it should get bval/bvec from your PAR file. If no, please let me know.
-Xiangrui

02 Oct 2013 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li

Hi O.A,
Thank you for the feedback. I realize it is because fullfile in older Matlab doesn't support cellstr input. Now I use strcat to fix the issue. Please wait for the next update to be available.

Also I tested only V4 of PAR file. In case of PAR file parsing problem, please send me a PAR file if yours is not V4.

-Xiangrui

27 Sep 2013 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li

The test on GE/Philips data was based limited dataset. Please report problem to author if there is any problem.

Comments and Ratings on Xiangrui's Files View all
Updated File Comment by Comments Rating
31 May 2014 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li peter888

the dicm2nii tool is very useful...
thanks Dr Xiangrui Li.

27 Jan 2014 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li Li, Xiangrui

Hi Paul,
Thank you for the comments and suggestions.

Now the missing file check is not as strict as before. For Philips data, this check is skipped due to the possible sparse instance numbering. For other vendors, missing files at beginning is allowed now.

The bug in save_dti_para is fixed.

The converter can deal with dicom files without meta info now.

Cheers.

-Xiangrui

19 Jan 2014 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li Groot, Paul

Hi Xiangrui,

Nice work! I just converted a bunch of PAR/RECs and a single DICOM series containing Philips DTI data. All PAR/RECs seem to be OK, so that's really nice. However, I had to change a few lines to get it working for the DICOM files.

One issue has to do with the instance numbering of the DICOMs. Our DTI series have sparse instance numbering. So, instead of skipping the series at the line where it prints a line about a missing instance file, I inserted the following:

H = h{i}; % cell array containing empty elements
h{i} = H(~ind); % only keep the non-empty ones

The second thing I had to modify, was the Manufacturer test in function save_dti_para. It seems that structure s initially contains a rather complete DICOM header, but when the for-loops continues, the structure is replaced by a reduced DICOM header that doesn't contain the Manufacturer string anymore. The solution is to store the manufacturer string in a separate variable, or to keep a separate copy of the initial structure s.

I also noticed that the DICOM reading part is very strict when it comes to PART10 compatibility. If the meta header is missing, it will report an unsupported file format. Strictly speaking, this is true, but a lot of (older) applications don't store the meta header at all.

Thanks for making these scripts available.
Paul

21 Nov 2013 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li Li, Xiangrui

Hi JuanesA89,
The error means number of slices extracted by the code is not a single number, which is odd. If you don't mind, you can send me one of your dicom files, or dicom header of a file returned by hdr = dicm_hdr(dicmFileName).

-Xiangrui

21 Nov 2013 DICOM to NIfTI converter dicm2nii.m converts dicom files into nifti files. Author: Xiangrui Li JuanesA89

Hi Xiangrui,
I used your code for converting a dicom file to a nii. And I get this error:

"Operands to the || and && operators
must be convertible to logical
scalar values.

Error in dicm2nii (line 493)
if ~isempty(nSL) && nSL>1

Error in dicm2nii>dicm2nii_gui
(line 1469)
dicm2nii(src, dst,
rstFmt, mocoOpt,
subjName);

Error in dicm2nii (line 168)
dicm2nii_gui(dataFolder); %
mis-use first two input for GUI

Error while evaluating uicontrol Callback"

Can you help me? Thanks

Contact us