> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/data/data-in-ango-hub/nrrd-file-compatibility.md).

# NRRD File Compatibility

Ango Hub supports NRRD files in the 3D Medical labeling editor when they describe a single 3D medical volume with enough spatial information to build the Axial, Coronal, and Sagittal views.

The `.nrrd` file extension alone does not guarantee that the file can be opened. The NRRD header must also describe a supported volume.

## Supported NRRD files

A supported NRRD asset must meet all of the following requirements:

| Header field       | Required value                                                                                                         |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `dimension`        | Must be `3`.                                                                                                           |
| `sizes`            | Must contain exactly 3 values, one for each axis.                                                                      |
| `space`            | Must be one of `left-posterior-superior`, `LPS`, `right-anterior-superior`, `RAS`, `left-anterior-superior`, or `LAS`. |
| `space directions` | Must be a 3x3 matrix. Each of the 3 rows must contain exactly 3 values.                                                |
| `space origin`     | Must contain exactly 3 values.                                                                                         |
| `space units`      | Optional. If omitted, Ango Hub uses `mm`.                                                                              |

Ango Hub supports NRRD files using `raw`, `ascii`, `txt`, `text`, `gzip`, or `gz` encoding.

The voxel data must use a scalar numeric NRRD `type`, such as signed or unsigned 8-bit, 16-bit, or 32-bit integers, `float`, or `double`.

## Unsupported NRRD files

Ango Hub does not support NRRD assets with any of the following properties:

* 2D, 4D, time-series, vector, or multi-component volumes where `dimension` is not `3`.
* 4D medical volumes with a leading list/vector/time axis, even if only 3 of the axes are spatial.
* Scanner-based coordinate systems, including `scanner-xyz` and `3D-*` spaces.
* Coordinate systems other than LPS, RAS, or LAS.
* Files with missing or malformed `sizes`, `space directions`, or `space origin` values.
* Detached-header NRRD files that use `data file` or `datafile`.
* NRRD files using `hex`, `bzip2`, or other encodings outside the supported encodings listed above.
* NRRD files using `block` or 64-bit integer data types.

If an unsupported NRRD file is opened in Ango Hub, the asset may fail to load and the editor may show warnings such as *Only 3D volumes are supported*, *Space information is missing in the NRRD file*, or *Space directions matrix is of incorrect shape*.

## Example supported header

```
NRRD0005
type: short
dimension: 3
space: left-posterior-superior
sizes: 512 512 128
space directions: (0.7,0,0) (0,0.7,0) (0,0,1.5)
space origin: (0,0,0)
space units: "mm" "mm" "mm"
encoding: gzip
```

## What to do if a file is not supported

Convert the volume before importing it into Ango Hub. The converted file should be a single 3D scalar volume with an LPS, RAS, or LAS coordinate system, 3 values in `sizes`, a 3x3 `space directions` matrix, and a 3-value `space origin`.
