CBI DICOM to NIfTI Converter
The dinifti program converts MRI images stored in DICOM format to NIfTI format.
dinifti is licensed under the standard BSD license.
2.33.3, released November 21, 2019.
A dinifti mailing list is hosted by the center. The list is for announcements, features requests and to indicate bugs. To subscribe to the list, please visit the page http://cbi.nyu.edu/mailman/listinfo/dinifti.
The program can convert single files, a list of files or a whole directory. If any of the input files are not in DICOM format, an error message will be printed, but the program will continue.
Usage: dinifti [OPTION] <DICOM input> <NIfTI output>
-g compressed output
-f <output format> 'a2' - ANALYZE 7.5 Dual file
'n2' - NIfTI-2 Dual file
'n1' - NIfTI-1 Single file **Default**
-d append series description to output file name(s)
--name="<format>" format output file name(s) according to <format>
where <format> :
%I = subject ID
%N = subject name
%S = series number
%D = series description
%Y = series date
%T = series time
%A = accession number
%C = image comments
%% = percentage sign
--name="%Y:%T - %A - %I - %D(%S)"
will result in name(s) formed like
date:time - accession - ID - description(number)
N.B.: format string must be enclosed in quotes
if format is specified, -d flag is ignored
the reserved character "/" will be rendered as "~"
-s # number of slices per volume
-v --verbose enable verbose status output
-n --noact do all processing, but do not write files
-h --help print this help and exit
-V --version print version number and exit
<DICOM input> can be single file, list of files or directory
<NIfTI output> can be single file or directory
DICOM: the CTN library developed by the Mallinckrodt Institue of Radiology, Washington University in St. Louis MO, http://wuerlim.wustl.edu/research/dicom/ctn.html.
NIfTI: the C reference implementation nifticlib developed by the NIfTI project, http://nifti.nimh.nih.gov/.
A subset of the CTN header files and libraries is needed in order to compile dinifti.
The header files and precompiled library for Fedora 14 32-bit, CentOS 5.6 64-bit and Mac OS X can be downloaded here: CTN-Mini.tar.gz.
The necessary NIfTI header files and precompiled library files for Fedora 14 32-bit, CentOS 5.6 64-bit and Mac OS X can be downloaded here: NIfTI-Mini.tar.gz.
dinifti is build using cmake (comes with many OS distributions, or can be downloaded from http://cmake.org.
If all of the include files and libraries where unpacked under a common root (e.g., includes in /usr/local/include and libraries in /usr/local/lib):
$ cd DICOMNIfTI/build
$ cmake -D PREFIX:PATH=/usr/local ..
If the include file and libraries where unpacked under different directory roots (e.g., includes in /developer/include and libraries in /shared/lib):
$ cd DICOMNIfTI/build
$ cmake -D INCLUDEDIR:PATH=/developer/include -D LIBDIR:PATH=/shared/lib ..