-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from brainlife/enh/more_metadata
[ENH] Expand metadata editing capabilities
- Loading branch information
Showing
6 changed files
with
210 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
# Multipart (split) DWI schemes | ||
# NOTE: I don't think this can be schemafied, since it depends on owner intent. | ||
MRIDiffusionMultipart: | ||
selectors: | ||
- datatype == "dwi" | ||
- suffix == "dwi" | ||
- match(extension, "^\.nii(\.gz)?$") | ||
fields: | ||
MultipartID: optional | ||
|
||
# Other recommended metadata | ||
MRIDiffusionOtherMetadata: | ||
selectors: | ||
- datatype == "dwi" | ||
- suffix == "dwi" | ||
- match(extension, "^\.nii(\.gz)?$") | ||
fields: | ||
PhaseEncodingDirection: recommended | ||
TotalReadoutTime: recommended |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
--- | ||
# Fieldmap data | ||
MRIFieldmapIntendedFor: | ||
selectors: | ||
- datatype == "fmap" | ||
- match(extension, '\.nii(\.gz)?$') | ||
fields: | ||
IntendedFor: | ||
level: optional | ||
description_addendum: | | ||
This field is optional, and in case the fieldmaps do not correspond | ||
to any particular scans, it does not have to be filled. | ||
MRIFieldmapB0FieldIdentifier: | ||
selectors: | ||
- datatype == "fmap" | ||
- match(extension, '\.nii(\.gz)?$') | ||
- '!("IntendedFor" in sidecar)' | ||
fields: | ||
B0FieldIdentifier: recommended | ||
|
||
# Case 1: Phase-difference map and at least one magnitude image | ||
MRIFieldmapPhaseDifferencePhasediff: | ||
selectors: | ||
- datatype == "fmap" | ||
- suffix == "phasediff" | ||
- match(extension, '\.nii(\.gz)?$') | ||
fields: | ||
EchoTime1: required | ||
EchoTime2: required | ||
|
||
# Case 2: Two phase maps and two magnitude images | ||
# NOTE: Need to check for presence of related files. | ||
# For example, magnitude1 needs EchoTime__fmap only if phase1 file exists, | ||
# but EchoTime1 if phasediff exists. | ||
MRIFieldmapTwoPhase: | ||
selectors: | ||
- datatype == "fmap" | ||
- intersects([suffix], ["phase1", "phase2"]) | ||
- match(extension, '\.nii(\.gz)?$') | ||
fields: | ||
EchoTime__fmap: required | ||
|
||
# Case 3: Direct field mapping | ||
MRIFieldmapDirectFieldMapping: | ||
selectors: | ||
- datatype == "fmap" | ||
- suffix == "fieldmap" | ||
- match(extension, '\.nii(\.gz)?$') | ||
fields: | ||
Units: | ||
level: required | ||
description_addendum: | | ||
Fieldmaps must be in units of Hertz (`"Hz"`), | ||
radians per second (`"rad/s"`), or Tesla (`"T"`). | ||
# Case 4: Multiple phase encoded directions ("pepolar") | ||
MRIFieldmapPepolar: | ||
selectors: | ||
- datatype == "fmap" | ||
- suffix == "epi" | ||
- match(extension, '\.nii(\.gz)?$') | ||
fields: | ||
PhaseEncodingDirection: required | ||
TotalReadoutTime: required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
--- | ||
# Task imaging data | ||
|
||
# Required fields | ||
MRIFuncRequired: | ||
selectors: | ||
- datatype == "func" | ||
- suffix == "bold" | ||
- match(extension, "^\.nii(\.gz)?$") | ||
fields: | ||
TaskName: | ||
level: required | ||
description_addendum: | | ||
A recommended convention is to name resting state task using labels | ||
beginning with `rest`. | ||
MRIFuncRepetitionTime: | ||
selectors: | ||
- datatype == "func" | ||
- suffix == "bold" | ||
- '!("VolumeTiming" in sidecar)' | ||
- match(extension, "^\.nii(\.gz)?$") | ||
fields: | ||
RepetitionTime: | ||
level: required | ||
level_addendum: mutually exclusive with `VolumeTiming` | ||
|
||
MRIFuncVolumeTiming: | ||
selectors: | ||
- datatype == "func" | ||
- suffix == "bold" | ||
- '!("RepetitionTime" in sidecar)' | ||
- match(extension, "^\.nii(\.gz)?$") | ||
fields: | ||
VolumeTiming: | ||
level: required | ||
level_addendum: mutually exclusive with `RepetitionTime` | ||
|
||
# Timing Parameters | ||
MRIFuncTimingParameters: | ||
selectors: | ||
- datatype == "func" | ||
- suffix == "bold" | ||
fields: | ||
NumberOfVolumesDiscardedByScanner: recommended | ||
NumberOfVolumesDiscardedByUser: recommended | ||
DelayTime: recommended | ||
AcquisitionDuration: | ||
level: recommended | ||
level_addendum: | | ||
required for sequences that are described with the `VolumeTiming` | ||
field and that do not have the `SliceTiming` field set to allow for | ||
accurate calculation of "acquisition time" | ||
issue: | ||
name: VOLUME_TIMING_MISSING_ACQUISITION_DURATION | ||
message: | | ||
The field 'VolumeTiming' requires 'AcquisitionDuration' or 'SliceTiming' to be defined. | ||
DelayAfterTrigger: recommended | ||
|
||
# fMRI task information | ||
MRIFuncTaskInformation: | ||
selectors: | ||
- datatype == "func" | ||
- suffix == "bold" | ||
fields: | ||
Instructions: | ||
level: recommended | ||
description_addendum: | | ||
This is especially important in context of resting state recordings and | ||
distinguishing between eyes open and eyes closed paradigms. | ||
TaskDescription: recommended | ||
CogAtlasID: recommended | ||
CogPOID: recommended | ||
|
||
# Should now be `part-phase_bold.nii`, but still require units | ||
PhaseSuffixUnits: | ||
selectors: | ||
- datatype == "func" | ||
- suffix == "phase" | ||
- match(extension, "^\.nii(\.gz)?$") | ||
fields: | ||
Units: required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters