Skip to main content
Skip table of contents

Convert Nifti to DICOM

This is not a single set of steps that work every time. One of the challenges is that Nifti can lack header information that contains image orientation. Putting these images into DICOM frequently results in unexpected orientations relative to customary DICOM orientations.

The general steps are

  1. Convert Nifti to DICOM with the code in
    There are tests in that run the code on the data. This was done as a quick way to script the running of the application and not having to leave the IDE to run the code.
  2. Flip and rotate the images to get the DICOM in the desired orientation.  This can be done with a variety of tools and performed on the Nifti prior to conversion or on the DICOM after conversion.  Fiji (ImageJ) and Horos are two examples.
  3. Set additional DICOM attributes. It may be necessary to further alter attributes in the DICOM images. This can be done using the DicomEdit command line.

Further details are available in issues XNAT-6422 and XNAT-6425 which documents two applications of this procedure.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.