Format conversion

DICOM ↔ NIfTI conversion

Convert a DICOM series to NIfTI (or back) for neuroimaging and research pipelines.

Problem

Your DICOM series needs to be converted to NIfTI-1 format for neuroimaging analysis pipelines (FSL, SPM, AFNI) or AI model training. NIfTI is the standard format for volumetric brain imaging — it stores 3D/4D data with an affine transformation matrix that maps voxel coordinates to scanner space, which DICOM doesn’t natively provide in a single file.

Steps

  1. Open the DICOM file (⌘O) containing the series to convert.

  2. Click Export in the top bar, then select Export Series to NIfTI-1 from the dropdown.

  3. The browser triggers a download of a .nii.gz (gzip-compressed NIfTI) file.

  4. Verify the output by inspecting the downloaded file:

    • The NIfTI header is at least 348 bytes
    • The magic string at offset 344 is n+1\0 or ni1\0
    • The volume dimensions (dim[1..3]) are positive integers
    • The affine matrix (srow_x, srow_y, srow_z) contains the spatial transformation — at least one component is non-zero (the affine is never identity for real DICOM→NIfTI)

Expected Result

  • Output filename contains .nii.gz.
  • NIfTI-1 header structure is valid (magic string, dimensions, affine).
  • Volume dimensions match the DICOM series dimensions.
  • The affine matrix correctly maps voxel indices to the DICOM patient coordinate system.
  • The pixel data is gzip-compressed, reducing file size for storage and transfer.