NIfTI Image Data
Data & ScienceNII is NIfTI’s single-file form, often used for neuroimaging research; .nii.gz is commonly its compressed form. Inspect dimensions, voxel sizes and spatial transforms, including affine/qform/sform, rather than appearance alone.
- Main use
- Store image arrays with spatial-coordinate information
- Data type
- Binary data
All sections, questions and sources
Content reviewed: · Editor:Kai
Opening steps
Choose your environment or purpose to see its steps.
Menu labels and support vary by app, OS and version. Preserve the original before making changes.
Troubleshooting by symptom
- Left/right appears different: inspect viewer conventions and spatial metadata.
- Misalignment: inspect affine, qform/sform and reference space.
- Time axis absent: inspect 4D shape and selected volume.
- Compressed file rejected: check .nii.gz support or decompression requirements.
NII → research data / display image
- Select required volumes/slices in compatible software and export separately.
- Verify array shape, coordinates, units and de-identification/sharing conditions.
Slice images such as PNG do not preserve full 3D/4D arrays, values and spatial coordinates.
Header-only changes can change meaning
Changing a spatial matrix changes relationships even when voxel values remain unchanged. Do not edit headers merely to make images look aligned; establish the intended reference space and processing.
Source for these steps:NIMH · NIfTI-1 Data Format / NiBabel project · Working with NIfTI images
Worked example: checks before handoff
Example: compare source/result shape and affine and provide the reference image and processing conditions when sharing an analysis.
Source for these steps:NIMH · NIfTI-1 Data Format / NiBabel project · Working with NIfTI images
Related-format differences
| Format / method | Purpose and preserved information |
|---|---|
| .nii | Store image arrays with spatial-coordinate information |
| DCM / PNG | DCM is DICOM and PNG display imagery, with different spatial/metadata structures. |
| NII → research data / display image | Slice images such as PNG do not preserve full 3D/4D arrays, values and spatial coordinates. |
Handling and security
Headers may retain participant/medical information; follow agreed sharing and de-identification checks.
Questions and answers
Is NII.GZ a different image format?
It is commonly gzip-compressed NIfTI; supporting tools may read it directly.
Can JPEG recreate the original?
Dimensions, precision and spatial metadata are not preserved equivalently.
Should I flip the array if orientation looks wrong?
Check display conventions versus coordinates first; visual-only flipping can break spatial relationships.
Format facts: name, steward and MIME type
- Formal name
- NIfTI Image Data
- Steward / specification
- NIMH
- MIME type
- Consult the producer or delivery system. The extension alone does not establish a MIME type.
Primary and official sources
- StandardNIfTI-1 Data Format
NIfTI single-file structure and specification.
NIMH · Link checked: - Software documentationWorking with NIfTI images
Shape, affine transforms, qform/sform and scaling.
NiBabel project · Link checked: