File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ SeqInfo = namedtuple(
103
103
'study_description' ,
104
104
'referring_physician_name' ,
105
105
'series_description' ,
106
+ 'sequence_name' ,
106
107
'image_type' ,
107
108
'accession_number' ,
108
109
'patient_age' ,
@@ -480,6 +481,16 @@ def group_dicoms_into_seqinfos(
480
481
image_type = tuple (dcminfo .ImageType )
481
482
motion_corrected = 'MoCo' in dcminfo .SeriesDescription \
482
483
or 'MOCO' in image_type
484
+
485
+ if dcminfo .get ([0x18 ,0x24 ], None ):
486
+ # GE and Philips scanners
487
+ sequence_name = dcminfo [0x18 ,0x24 ].value
488
+ elif dcminfo .get ([0x19 , 0x109c ], None ):
489
+ # Siemens scanners
490
+ sequence_name = dcminfo [0x19 , 0x109c ].value
491
+ else :
492
+ sequence_name = 'Not found'
493
+
483
494
info = SeqInfo (
484
495
total ,
485
496
os .path .split (series_files [0 ])[1 ],
@@ -496,6 +507,7 @@ def group_dicoms_into_seqinfos(
496
507
dcminfo .get ('StudyDescription' ),
497
508
refphys ,
498
509
dcminfo .get ('SeriesDescription' ),
510
+ sequence_name ,
499
511
image_type ,
500
512
accession_number ,
501
513
# For demographics to populate BIDS participants.tsv
You can’t perform that action at this time.
0 commit comments