dinifti - converts DICOM files into the NIfTI format
dinifti [options] <DICOM input> <NIfTI output>
dinifti converts a single or several files at once into the NIfTI data
format. The DICOM input can be specified as a single filename, a list
of file or a directory. In case of a directory all files in this
directory will be converted.
Images belonging to the same recording series will be appropriately
merged into a single 3d or 4d NIfTI file. To achieve this dinifti
gathers the number of time points and number of slices per volume from
the DICOM header. When this is impossible, dinifti will issue a warning
(i.e. when it can find only 1 slice per volume and 1 time point). The
user has the option of running the program using the -s option and
specifying the number of slices per volume.
A number of items are retrieved from the Siemens Shadow set. Following
is a list of items and default value if this is not Siemens.
Number of groups: 1
Number of channels: 1
Sagital, Coronal and Transverse position: From DICOM (0020,0032)
-g NIfTI files will be compressed.
Set the output file format. If set to a2 ANALYZE 7.5 file pairs
(hdr/img) will be generates. Setting n2 will cause dinifti to
generate NIfTI image file pairs. The default output format (n1)
are single NIfTI files (header and image data combined in one
-d If set dinifti appends the series description from the DICOM
header to the output file name(s).
If two image series share a common description dinifti will
append as many characters as necessary to the second series
description to create a unique filename. In this case a warning
message is displayed that shows the old and the modified
Format output file name(s) according to <format> string, which
has to be enclosed in quotes (")
The format is interpreted in the usual printf-like way. Ordinary
characters are directly copied, a percent sign is represented by
%%, otherwise % indicates a conversion. The special character
"/" is translated to "~" to avoid confusion with the directory
If --name is present, -d flag will be ignored.
%I Subject ID
%N Subject name
%S Relative series number
%D Series description
%Y Series date (YYYYMMDD)
%T Series time (HHMM)
%A Accession number
%C Image comments
Example: --name="%Y:%T- %A - %I -%D(%S)"
-s # This option can be used to specify the number of slices in the
volume, if dinifti fails to autodetect the correct value.
Enables verbose status messages. If any warning message occurs,
this option can be helpful to determine which imageseries caused
If set, dinifti performs all processing steps, but does not
write NIfTI files at the end. This can be useful to quickly
inspect the content of a DICOM directory (if ran together with
Print this help page and exit.
Print the version number and exit.
dinifti is written by Valerio Luccio (firstname.lastname@example.org).
List page: http://cbi.nyu.edu/mailman/listinfo/dinifti List email:
The software is released under the standard BSD license: