Skip to content
David Gobbi edited this page Jul 5, 2024 · 3 revisions

Generate a DICOM series from a NIfTI file.

Usage

niftitodicom -o directory file.nii [file.dcm ...]

Options

-o directory            The output directory.
-s --silent             Do not print anything while executing.
-v --verbose            Verbose error reporting.
--no-reordering         Never reorder slices, rows, or columns.
--axial                 Produce axial slices.
--coronal               Produce coronal slices.
--sagittal              Produce sagittal slices.
--series-description    Textual description of the series.
--series-number         The series number to use.
--modality              The modality: MR or CT or SC.
--uid-prefix            A DICOM uid prefix (optional).
--version               Print the version and exit.
--help                  Documentation for niftitodicom.

Description

This program will convert a NIfTI file into a DICOM series. It reads the NIfTI file header and does the best job that it can to generate a series of DICOM files. To help it along, you can provide a DICOM file from the same series on the command line after the NIfTI file, or even better, list all of the DICOM files that were used as the source of the data in the NIfTI file. Study-related meta data will be copied from these DICOM files into the output DICOM files.

Details

Unless the --no-reordering option is provided, niftitodicom will ensure that the images are in the usual orientation (right is left, posterior is down) by reordering the columns or rows as compared to the NIFTI file. If the NIFTI file is floating-point, then the data might be rescaled when written to DICOM as 16-bit integers. If any data values are too large to fit into 16 bits, then all the data will be scaled down. If the data values all have a magnitude smaller than 2.05, then all the data will be scaled up by a factor of 1000.

Clone this wiki locally