File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -527,8 +527,7 @@ def group_dicoms_into_seqinfos(
527
527
refphys = '-'
528
528
529
529
image_type = tuple (dcminfo .ImageType )
530
- motion_corrected = 'MoCo' in dcminfo .SeriesDescription \
531
- or 'MOCO' in image_type
530
+ motion_corrected = 'MOCO' in image_type
532
531
533
532
if dcminfo .get ([0x18 ,0x24 ], None ):
534
533
# GE and Philips scanners
Original file line number Diff line number Diff line change @@ -309,8 +309,9 @@ def infotodict(seqinfo):
309
309
image_data_type = None
310
310
for s in seqinfo :
311
311
# XXX: skip derived sequences, we don't store them to avoid polluting
312
- # the directory
313
- if s .is_derived :
312
+ # the directory, unless it is the motion corrected ones
313
+ # (will get _rec-moco suffix)
314
+ if s .is_derived and not s .is_motion_corrected :
314
315
skipped .append (s .series_id )
315
316
lgr .debug ("Ignoring derived data %s" , s .series_id )
316
317
continue
@@ -435,6 +436,9 @@ def infotodict(seqinfo):
435
436
# if there is no _run -- no run label addded
436
437
run_label = None
437
438
439
+ if s .is_motion_corrected :
440
+ assert s .is_derived , "Motion corrected images must be 'derived'"
441
+
438
442
if s .is_motion_corrected and 'rec-' in regd .get ('bids' , '' ):
439
443
raise NotImplementedError ("want to add _acq-moco but there is _acq- already" )
440
444
You can’t perform that action at this time.
0 commit comments