Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Introduce GIFTI formats in derivatives #1333

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ In particular, if a BIDS dataset contains a `derivatives/` subdirectory,
the contents of that directory may be a heterogeneous mix of BIDS Derivatives
datasets and non-compliant derivatives.

## File Formation specification
## File format specification

### Imaging files

Expand Down
36 changes: 36 additions & 0 deletions src/derivatives/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,46 @@ in [Derived dataset and pipeline description][derived-dataset-description].
For example, if a summary statistic is derived from a given task, the file
name SHOULD contain [`_task-<label>`](../appendices/entities.md#task).

## File format specification

Derived data may be resampled into structures that are not well-handled by the
raw data formats.
In this section, we describe standard formats that SHOULD be adhered to when
appropriate, and the extensions they should have.

### GIFTI Surface Data Format

The [GIFTI][gifti] format is an XML-based structure containing one or more data arrays,
and is well-suited to describing surface geometry and parcellations.

The following extension table is reproduced in part from Section 9.0 of the
[GIFTI specification][gifti-spec], indicating the expected extensions of different data arrays
or combinations of data arrays.

| Intent | Extension |
|-------------|---------------|
| Coordinates | `.coord.gii` |
| Functional | `.func.gii` |
| Labels | `.label.gii` |
| RGB or RGBA | `.rgba.gii` |
| Shape | `.shape.gii` |
| Surface | `.surf.gii` |
| Tensors | `.tensor.gii` |
| Time Series | `.time.gii` |
| Topology | `.topo.gii` |
| Vector | `.vector.gii` |

Unless otherwise stated, bare `.gii` extensions SHOULD NOT be used
for GIFTI files.

<!-- Link Definitions -->

[definitions]: ../common-principles.md#definitions

[storage]: ../common-principles.md#storage-of-derived-datasets

[derived-dataset-description]: ../modality-agnostic-files.md#derived-dataset-and-pipeline-description

[gifti]: https://www.nitrc.org/projects/gifti/

[gifti-spec]: https://www.nitrc.org/frs/download.php/2871/GIFTI_Surface_Format.pdf