diff --git a/src/common-principles.md b/src/common-principles.md index d434e85485..234811093e 100644 --- a/src/common-principles.md +++ b/src/common-principles.md @@ -480,8 +480,13 @@ It is also RECOMMENDED to set the `SourceDatasets` field in `dataset_description ### Imaging files -All imaging data MUST be stored using the NIfTI file format. We RECOMMEND using -compressed NIfTI files (.nii.gz), either version 1.0 or 2.0. If using compressed files, +Imaging data SHOULD be stored using the NIfTI file format. +Large imaging data MAY instead be stored using the +[OME-Zarr (OME-NGFF)](https://ngff.openmicroscopy.org/) file format. + +#### NIfTI + +We RECOMMEND using compressed NIfTI files (.nii.gz), either version 1.0 or 2.0. If using compressed files, the gzip header SHOULD lack source filenames and timestamps. Imaging data SHOULD be converted to the NIfTI format using a tool that provides as much of the NIfTI header information (such as orientation and slice timing information) as @@ -501,6 +506,24 @@ The [BIDS-validator](https://github.com/bids-standard/bids-validator) will check for conflicts between the JSON file and the data recorded in the NIfTI header. +#### OME-Zarr + +[Zarr](https://zarr-specs.readthedocs.io/) is a chunked, cloud-optimized format that provides efficient access to +large multidimensional datasets without requiring a full download. +[OME-Zarr](https://ngff.openmicroscopy.org/), developed by the Open Microscopy Environment (OME), +extends Zarr with bioimaging-specific metadata. +OME-Zarr is particularly suitable for very large imaging volumes (for example, high-resolution +ex vivo MRI) where NIfTI would be impractical for streaming or web-based visualization. + +OME-Zarr filesets are stored with the `.ome.zarr` extension. +Spatial metadata (such as the axis names and units, and coordinate transformations) SHOULD +be stored within the OME-Zarr metadata following the +[OME-Zarr version 0.5 specification](https://ngff.openmicroscopy.org/specifications/0.5/index.html) +(the latest released version). +An example dataset containing an OME-Zarr can be found in the +[BIDS examples repository](https://github.com/bids-standard/bids-examples/tree/master/micr_XPCTzarr) +and can be used as helpful guidance when curating new datasets. + ### Tabular files Tabular data MUST be saved as plain-text, tab-delimited values (TSV) files diff --git a/src/modality-specific-files/microscopy.md b/src/modality-specific-files/microscopy.md index 35f24e3912..c11902f6a3 100644 --- a/src/modality-specific-files/microscopy.md +++ b/src/modality-specific-files/microscopy.md @@ -39,8 +39,9 @@ by the [Open Microscopy Environment](https://www.openmicroscopy.org/) for whole- the [OME-TIFF file specifications](https://docs.openmicroscopy.org/ome-model/6.1.2/ome-tiff/file-structure.html). The OME-TIFF file allows for multi-page TIFF files to store multiple image planes and supports multi-resolution pyramidal tiled images. An OME-XML data block is also embedded inside the -file's header. Further, OME-ZARR (sometimes referred to as OME-NGFF or NGFF) has been developed to provide improved +file's header. Further, OME-Zarr (sometimes referred to as OME-NGFF or NGFF) has been developed to provide improved access and storage for large data via chunked and compressed N-dimensional arrays. +For details on using OME-Zarr in BIDS, see the [Common Principles](../common-principles.md#ome-zarr). The BIDS standard accepts microscopy data in a number of file formats to accommodate datasets stored in 2D image formats and whole-slide imaging formats, to accommodate lossless and lossy @@ -57,7 +58,7 @@ Microscopy raw data MUST be stored in one of the following formats: (`.ome.tif` for standard TIFF files or `.ome.btf` for [BigTIFF](https://web.archive.org/web/20240706160214/https://www.awaresystems.be/imaging/tiff/bigtiff.html) files) -- [OME-ZARR/NGFF](https://ngff.openmicroscopy.org/latest/) (`.ome.zarr` directories) +- [OME-Zarr/NGFF](https://ngff.openmicroscopy.org/latest/) (`.ome.zarr` directories) ### Modality suffixes Microscopy data currently support the following imaging modalities: diff --git a/src/schema/meta/templates.yaml b/src/schema/meta/templates.yaml index 4e7aa668a0..c00a3ccfd2 100644 --- a/src/schema/meta/templates.yaml +++ b/src/schema/meta/templates.yaml @@ -88,6 +88,7 @@ deriv: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json entities: $ref: meta.templates.deriv.spatial.entities diff --git a/src/schema/rules/files/raw/anat.yaml b/src/schema/rules/files/raw/anat.yaml index ba751c0253..07d1ceb3e8 100644 --- a/src/schema/rules/files/raw/anat.yaml +++ b/src/schema/rules/files/raw/anat.yaml @@ -16,6 +16,7 @@ nonparametric: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -46,6 +47,7 @@ parametric: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -59,6 +61,7 @@ defacemask: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -73,6 +76,7 @@ megre: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -88,6 +92,7 @@ mese: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -104,6 +109,7 @@ multiflip: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -120,6 +126,7 @@ multiinversion: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -135,6 +142,7 @@ mp2rage: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -153,6 +161,7 @@ vfamt: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat @@ -170,6 +179,7 @@ mtr: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - anat diff --git a/src/schema/rules/files/raw/dwi.yaml b/src/schema/rules/files/raw/dwi.yaml index cc211150a0..cbee06374f 100644 --- a/src/schema/rules/files/raw/dwi.yaml +++ b/src/schema/rules/files/raw/dwi.yaml @@ -5,6 +5,7 @@ dwi: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json - .bvec - .bval @@ -22,6 +23,7 @@ sbref: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - dwi @@ -41,6 +43,7 @@ ScannerDerivatives: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - dwi diff --git a/src/schema/rules/files/raw/fmap.yaml b/src/schema/rules/files/raw/fmap.yaml index 7d04c547a4..3d1bacf447 100644 --- a/src/schema/rules/files/raw/fmap.yaml +++ b/src/schema/rules/files/raw/fmap.yaml @@ -11,6 +11,7 @@ fieldmaps: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - fmap @@ -25,6 +26,7 @@ pepolar: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json - .bval - .bvec @@ -38,6 +40,7 @@ pepolar_m0scan: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - fmap @@ -48,6 +51,7 @@ TB1DAM: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - fmap @@ -63,6 +67,7 @@ TB1EPI: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - fmap @@ -82,6 +87,7 @@ RFFieldMaps: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - fmap @@ -98,6 +104,7 @@ TB1SRGE: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - fmap @@ -116,6 +123,7 @@ parametric: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - fmap diff --git a/src/schema/rules/files/raw/func.yaml b/src/schema/rules/files/raw/func.yaml index 4072d04437..6412a75592 100644 --- a/src/schema/rules/files/raw/func.yaml +++ b/src/schema/rules/files/raw/func.yaml @@ -7,6 +7,7 @@ func: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - func diff --git a/src/schema/rules/files/raw/perf.yaml b/src/schema/rules/files/raw/perf.yaml index 330bdc087a..302bfe4378 100644 --- a/src/schema/rules/files/raw/perf.yaml +++ b/src/schema/rules/files/raw/perf.yaml @@ -6,6 +6,7 @@ asl: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - perf diff --git a/src/schema/rules/files/raw/pet.yaml b/src/schema/rules/files/raw/pet.yaml index 2f543efac1..3aeaf0edcd 100644 --- a/src/schema/rules/files/raw/pet.yaml +++ b/src/schema/rules/files/raw/pet.yaml @@ -5,6 +5,7 @@ pet: extensions: - .nii.gz - .nii + - .ome.zarr/ - .json datatypes: - pet