The dinifti program converts MRI images stored in DICOM format to NIfTI format.
dinifti is licensed under the standard BSD license.
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>
Options:
-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
Example:
--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
I/O Options
<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://erl.wustl.edu/.
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 Red Hat 9 and Mac OS X can be downloaded here:
CTN-Mini.tar.gz.
The necessary NIfTI header files and precompiled library files for Red Hat 9 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/buildIf the include file and libraries where unpacked under different directory roots (e.g., includes in /developer/include and libraries in /shared/lib):
$ cmake -D PREFIX:PATH=/usr/local ..
$ make
$ cd DICOMNIfTI/build
$ cmake -D INCLUDEDIR:PATH=/developer/include -D LIBDIR:PATH=/shared/lib ..
$ make