Skip to content

Commit 04faf74

Browse files
authored
Merge pull request #1974 from effigies/fix/acquisitionduration
[ENH] Update AcquisitionDuration definition to match DICOM, define FrameAcquisitionDuration for sparse sequences
2 parents 553b0d6 + ce941e2 commit 04faf74

File tree

5 files changed

+59
-23
lines changed

5 files changed

+59
-23
lines changed

src/modality-specific-files/magnetic-resonance-imaging-data.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,13 @@ to be populated for functional sequences. Note that all these options can be
600600
used for non sparse sequences but that only options B, D and E are valid for
601601
sparse sequences.
602602

603-
| | **`RepetitionTime`** | **`SliceTiming`** | **`AcquisitionDuration`** | **`DelayTime`** | **`VolumeTiming`** |
604-
| -------- | -------------------- | ----------------- | ------------------------- | --------------- | ------------------ |
605-
| option A | \[ X ] | | \[ ] | | \[ ] |
606-
| option B | \[ ] | \[ X ] | | \[ ] | \[ X ] |
607-
| option C | \[ ] | | \[ X ] | \[ ] | \[ X ] |
608-
| option D | \[ X ] | \[ X ] | \[ ] | | \[ ] |
609-
| option E | \[ X ] | | \[ ] | \[ X ] | \[ ] |
603+
| | **`RepetitionTime`** | **`SliceTiming`** | **`FrameAcquisitionDuration`** | **`DelayTime`** | **`VolumeTiming`** |
604+
| -------- | -------------------- | ----------------- | ------------------------------ | --------------- | ------------------ |
605+
| option A | \[ X ] | | \[ ] | | \[ ] |
606+
| option B | \[ ] | \[ X ] | | \[ ] | \[ X ] |
607+
| option C | \[ ] | | \[ X ] | \[ ] | \[ X ] |
608+
| option D | \[ X ] | \[ X ] | \[ ] | | \[ ] |
609+
| option E | \[ X ] | | \[ ] | \[ X ] | \[ ] |
610610

611611
**Legend**
612612

src/schema/objects/metadata.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ AcquisitionDuration:
2020
name: AcquisitionDuration
2121
display_name: Acquisition Duration
2222
description: |
23-
Duration (in seconds) of volume acquisition.
23+
Duration (in seconds) of scan acquisition, including all volumes for multi-volume scans.
2424
Corresponds to [DICOM Tag 0018, 9073](https://dicomlookup.com/dicomtags/(0018,9073)) `Acquisition Duration`.
25-
This field is mutually exclusive with `"RepetitionTime"`.
2625
type: number
2726
exclusiveMinimum: 0
2827
unit: s
@@ -1200,6 +1199,15 @@ FlipAngle:
12001199
unit: degree
12011200
exclusiveMinimum: 0
12021201
maximum: 360
1202+
FrameAcquisitionDuration:
1203+
name: FrameAcquisitionDuration
1204+
display_name: Frame Acquisition Duration
1205+
description: |
1206+
Duration (in seconds) of volume acquisition.
1207+
Corresponds to DICOM Tag 0018, 9220 `Frame Acquisition Duration`.
1208+
type: number
1209+
exclusiveMinimum: 0
1210+
unit: s
12031211
FrameDuration:
12041212
name: FrameDuration
12051213
display_name: Frame Duration

src/schema/rules/checks/func.yaml

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PhaseSuffixDeprecated:
1212
level: warning
1313
selectors:
1414
- datatype == "func"
15+
- match(extension, "^\.nii(\.gz)?$")
1516
checks:
1617
- suffix != "phase"
1718

@@ -67,6 +68,7 @@ SliceTimingGreaterThanRepetitionTime:
6768
level: error
6869
selectors:
6970
- suffix == "bold"
71+
- match(extension, "^\.nii(\.gz)?$")
7072
- type(sidecar.SliceTiming) != "null"
7173
- type(sidecar.RepetitionTime) != "null"
7274
checks:
@@ -88,24 +90,24 @@ VolumeTimingRepetitionTimeMutex:
8890
or 'VolumeTiming' when variable times are used.
8991
level: error
9092
selectors:
91-
- type(nifti_header) != "null"
9293
- intersects([suffix], ["asl", "bold"])
94+
- match(extension, "^\.nii(\.gz)?$")
9395
- type(sidecar.VolumeTiming) != "null"
9496
checks:
9597
- type(sidecar.RepetitionTime) == "null"
9698

97-
RepetitionTimeAcquisitionDurationMutex:
99+
RepetitionTimeFrameAcquisitionDurationMutex:
98100
issue:
99101
code: REPETITION_TIME_AND_ACQUISITION_DURATION_MUTUALLY_EXCLUSIVE
100102
message: |
101-
The fields 'RepetitionTime' and 'AcquisitionDuration' for this file are mutually exclusive.
103+
The fields 'RepetitionTime' and 'FrameAcquisitionDuration' for this file are mutually exclusive.
102104
To specify acquisition duration, use 'SliceTiming' or 'DelayTime'
103-
(RepetitionTime - AcquisitionDuration).
105+
(RepetitionTime - FrameAcquisitionDuration).
104106
level: error
105107
selectors:
106-
- type(nifti_header) != "null"
107108
- intersects([suffix], ["asl", "bold"])
108-
- type(sidecar.AcquisitionDuration) != "null"
109+
- match(extension, "^\.nii(\.gz)?$")
110+
- type(sidecar.FrameAcquisitionDuration) != "null"
109111
checks:
110112
- type(sidecar.RepetitionTime) == "null"
111113

@@ -114,24 +116,44 @@ VolumeTimingDelayTimeMutex:
114116
code: VOLUME_TIMING_AND_DELAY_TIME_MUTUALLY_EXCLUSIVE
115117
message: |
116118
The fields 'VolumeTiming' and 'DelayTime' for this file are mutually exclusive.
117-
To specify acquisition duration, use 'AcquisitionDuration' or 'SliceTiming'.
119+
To specify acquisition duration, use 'FrameAcquisitionDuration' or 'SliceTiming'.
118120
level: error
119121
selectors:
120-
- type(nifti_header) != "null"
121122
- intersects([suffix], ["asl", "bold"])
123+
- match(extension, "^\.nii(\.gz)?$")
122124
- type(sidecar.VolumeTiming) != "null"
125+
- type(sidecar.RepetitionTime) == "null"
123126
checks:
124127
- type(sidecar.DelayTime) == "null"
125128

126-
VolumeTimingMissingAcquisitionDuration:
129+
VolumeTimingMissingFrameAcquisitionDuration:
127130
issue:
128131
code: VOLUME_TIMING_MISSING_ACQUISITION_DURATION
129132
message: |
130-
The field 'VolumeTiming' requires 'AcquisitionDuration' or 'SliceTiming' to be defined.
133+
The field 'VolumeTiming' requires 'FrameAcquisitionDuration' or 'SliceTiming' to be defined.
131134
level: error
132135
selectors:
133-
- type(nifti_header) != "null"
134136
- intersects([suffix], ["asl", "bold"])
137+
- match(extension, "^\.nii(\.gz)?$")
138+
- type(sidecar.VolumeTiming) != "null"
139+
- type(sidecar.RepetitionTime) == "null"
140+
checks:
141+
- |
142+
"SliceTiming" in sidecar ||
143+
"FrameAcquisitionDuration" in sidecar ||
144+
"AcquisitionDuration" in sidecar
145+
146+
DeprecatedAcquisitionDuration:
147+
issue:
148+
code: DEPRECATED_ACQUISITION_DURATION
149+
message: |
150+
The 'AcquisitionDuration' field has been replaced with 'FrameAcquisitionDuration'
151+
to indicate the duration of volume acquisition in sparse acquisition sequences.
152+
level: warning
153+
selectors:
154+
- intersects([suffix], ["asl", "bold"])
155+
- match(extension, "^\.nii(\.gz)?$")
135156
- type(sidecar.VolumeTiming) != "null"
157+
- type(sidecar.FrameAcquisitionDuration) == "null"
136158
checks:
137-
- '"SliceTiming" in sidecar || "AcquisitionDuration" in sidecar'
159+
- '!("AcquisitionDuration" in sidecar)'

src/schema/rules/sidecars/func.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ MRIFuncVolumeTiming:
4444
description_addendum: |
4545
This field is mutually exclusive with `"DelayTime"`.
4646
If defined, this requires acquisition time (TA) be defined via either
47-
`"SliceTiming"` or `"AcquisitionDuration"`.
47+
`"SliceTiming"` or `"FrameAcquisitionDuration"`.
4848
4949
# Timing Parameters
5050
MRIFuncTimingParameters:
@@ -56,13 +56,18 @@ MRIFuncTimingParameters:
5656
NumberOfVolumesDiscardedByScanner: optional
5757
NumberOfVolumesDiscardedByUser: optional
5858
DelayTime: optional
59-
AcquisitionDuration:
59+
FrameAcquisitionDuration:
6060
level: optional
6161
level_addendum: |
6262
required for sequences that are described with the `VolumeTiming`
6363
field and that do not have the `SliceTiming` field set to allow for
6464
accurate calculation of "acquisition time"
6565
DelayAfterTrigger: optional
66+
AcquisitionDuration:
67+
level: deprecated
68+
description_addendum: |
69+
This field was previously used to indicate volume acquisition duration
70+
for BOLD data. The `FrameAcquisitionDuration` field should be used instead.
6671
6772
# fMRI task information
6873
MRIFuncTaskInformation:

src/schema/rules/sidecars/mri.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ MRITimingParameters:
262262
level: optional
263263
level_addendum: required if `inv` entity is present
264264
DwellTime: recommended
265+
AcquisitionDuration: optional
265266

266267
EchoTimeRequiredASL:
267268
selectors:

0 commit comments

Comments
 (0)