Skip to content

Commit

Permalink
enh tables in common data types
Browse files Browse the repository at this point in the history
  • Loading branch information
sappelhoff committed Sep 15, 2020
1 parent 66fd804 commit d6907e1
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/05-derivatives/02-common-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ JSON file is also REQUIRED.
Each derivative type defines their own set of fields, but all of them
share the following (non-required) ones:

| **Key name** | **Description** |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Description | RECOMMENDED. Free-form natural language description of the nature of the file. |
| Sources | OPTIONAL. A list of files with the paths specified relative to dataset root; these files were directly used in the creation of this derivative data file. For example, if a derivative A is used in the creation of another derivative B, which is in turn used to generate C in a chain of A->B->C, C should only list B in `Sources`, and B should only list A in `Sources`. However, in case both X and Y are directly used in the creation of Z, then Z should list X and Y in `Sources`, regardless of whether X was used to generate Y. |
| RawSources | OPTIONAL. A list of paths relative to dataset root pointing to the BIDS-Raw file(s) that were used in the creation of this derivative. |
| **Key name** | **Requirement level** | **Data type** | **Description** |
| ------------ | --------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Description | RECOMMENDED | [string][] | Free-form natural language description of the nature of the file. |
| Sources | OPTIONAL | [array][] of [strings][] | A list of files with the paths specified relative to dataset root; these files were directly used in the creation of this derivative data file. For example, if a derivative A is used in the creation of another derivative B, which is in turn used to generate C in a chain of A->B->C, C should only list B in `Sources`, and B should only list A in `Sources`. However, in case both X and Y are directly used in the creation of Z, then Z should list X and Y in `Sources`, regardless of whether X was used to generate Y. |
| RawSources | OPTIONAL | [array][] of [strings][] | A list of paths relative to dataset root pointing to the BIDS-Raw file(s) that were used in the creation of this derivative. |

### Examples

Expand Down Expand Up @@ -71,9 +71,9 @@ The `space` entity may take any value in [Image-Based Coordinate Systems][coords
If the `space` entity is omitted, or the space is not in the [Standard template
identifiers][templates] table, then the `SpatialReference` metadata is REQUIRED.

| **Key name** | **Description** |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| SpatialReference | RECOMMENDED if the derivative is aligned to a standard template listed in [Standard template identifiers][templates]. REQUIRED otherwise. For images with a single reference, the value MUST be a single string. For images with multiple references, such as surface and volume references, a JSON object MUST be used. |
| **Key name** | **Requirement level** | **Data type** | **Description** | |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SpatialReference | RECOMMENDED if the derivative is aligned to a standard template listed in [Standard template identifiers][templates]. REQUIRED otherwise. | [string][] or [object][] | For images with a single reference, the value MUST be a single string. For images with multiple references, such as surface and volume references, a JSON object MUST be used. See examples below. |

### SpatialReference key allowed values

Expand Down Expand Up @@ -188,3 +188,6 @@ static volume, a `RepetitionTime` property would no longer be relevant).
[coordsys]: ../99-appendices/08-coordinate-systems.md#image-based-coordinate-systems
[templates]: ../99-appendices/08-coordinate-systems.md#standard-template-identifiers
[object]: https://www.json.org/json-en.html
[string]: https://www.w3schools.com/js/js_json_syntax.asp
[strings]: https://www.w3schools.com/js/js_json_syntax.asp
[array]: https://www.w3schools.com/js/js_json_arrays.asp

0 comments on commit d6907e1

Please sign in to comment.