DICOM, NRRD and NIfTI volumes
CT and MRI scans arrive as DICOM series, NRRD or NIfTI files. Supervisely stores them as NRRD volumes and keeps every 3D mask as an NRRD file of its own.
- Data
- Medical volumes
- Labels
- MasksBoxes
- Files
.dcm, .nrrd, .nii, .nii.gz- Import / export
- Yes / Yes
What is the DICOM, NRRD & NIfTI format?
DICOM is the standard for medical images: a CT or MRI series is a set of .dcm slices with patient and acquisition data. NRRD keeps a whole volume, or a 3D mask, in one file with a text header that describes its dimensions, spacing and orientation. NIfTI (.nii, .nii.gz) is another single-file volume format, and segmentation masks often come as NIfTI files next to the scans.
Supervisely stores volumes as NRRD: DICOM series are converted to NRRD on import. Annotations are Supervisely volume JSON, with 2D figures on the slices of the planes and 3D masks in spatialFigures; the data of every mask_3d is saved as an .nrrd file in the mask folder.
Folder structure and an example
project_name
├── dataset_name
│ ├── ann
│ │ └── CTChest.nrrd.json
│ ├── mask
│ │ └── CTChest.nrrd
│ │ └── daff638a423a4bcfa34eb12e42243a87.nrrd
│ └── volume
│ └── CTChest.nrrd
├── key_id_map.json
└── meta.jsondataset_name
├── CTChest # the masks of CTChest, one file per class
│ ├── lung.nii.gz
│ └── tumor.nii.gz
├── CTChest.nii.gz
└── Spine.nii.gz # a volume without annotations{
"key": "bfed5ee444d849118d7aabc350248cb8",
"tags": [],
"objects": [
{ "key": "6c1587f381bf419e9d5c2ebd5967e28f", "classTitle": "lung_mask3d", "tags": [] }
],
"planes": [],
"spatialFigures": [
{
"key": "daff638a423a4bcfa34eb12e42243a87",
"objectKey": "6c1587f381bf419e9d5c2ebd5967e28f",
"geometryType": "mask_3d",
"geometry": {
"mask_3d": { "data": "H4sIAGW9OmUC ... CYAE1Nj5QMACwC", "space_origin": [194, 218, -348] },
"shape": "mask_3d",
"geometryType": "mask_3d"
}
}
]
}Import and export DICOM, NRRD & NIfTI in Supervisely
Import DICOM, NRRD & NIfTI into Supervisely
- Import DICOM Volumes
Imports DICOM series and NRRD files without annotations, in any folder structure, converting DICOM to NRRD. Enterprise users can upload from a folder on their own computer through an agent.
- Import data: NIfTI
Imports
.niiand.nii.gzvolumes with semantic or instance segmentation masks, grouped by volume name or by plane. - Import Volumes in Supervisely format
Imports NRRD volumes with Supervisely annotations and their NRRD masks. Old STL interpolations become 3D masks.
- Import data: .NRRD, .DCM
Drops volumes into a single dataset, without annotations.
Export from Supervisely to DICOM, NRRD & NIfTI
- Export Volumes with 3D Annotations
Exports volumes and masks as NRRD, which open in 3D Slicer and MITK: instance masks per object, a semantic mask with
class2idx.json, NIfTI as an option, and STL or OBJ meshes. - Export volume project to cloud storage
Copies a volume project in Supervisely format to Amazon S3, Google Cloud Storage, Azure or another S3-compatible storage, from a private instance.
All apps are in the Ecosystem, under Import and Export. Every project is stored in Supervisely JSON in between.
Converting DICOM, NRRD & NIfTI to and from Supervisely JSON
| DICOM, NRRD & NIfTI | Supervisely JSON | Notes |
|---|---|---|
DICOM series (.dcm) | NRRD volume in volume/ | Converted on import. |
| NRRD 3D mask | mask_3d in spatialFigures | Its data is the file mask/<volume>/<figure key>.nrrd. |
NIfTI mask named after a class (lung.nii.gz) | mask_3d objects of that class | Each value in the mask is a separate object. |
| slice of an axial, coronal or sagittal plane | bitmap or rectangle in planes[].slices[] | |
| instance and semantic NRRD or NIfTI masks | every object of the volume | On export, objects that are not 3D masks are also written as 3D masks. |