@@ -450,7 +450,7 @@ def group_dicoms_into_seqinfos(
450
450
# nothing to see here, just move on
451
451
continue
452
452
dcminfo = mw .dcm_data
453
- files = [files [i ] for i , s in enumerate (groups [0 ]) if s == series_id ]
453
+ series_files = [files [i ] for i , s in enumerate (groups [0 ]) if s == series_id ]
454
454
# turn the series_id into a human-readable string -- string is needed
455
455
# for JSON storage later on
456
456
if per_studyUID :
@@ -460,7 +460,7 @@ def group_dicoms_into_seqinfos(
460
460
461
461
series_id = '-' .join (map (str , series_id ))
462
462
463
- size = list (mw .image_shape ) + [len (files )]
463
+ size = list (mw .image_shape ) + [len (series_files )]
464
464
total += size [- 1 ]
465
465
if len (size ) < 4 :
466
466
size .append (1 )
@@ -482,9 +482,9 @@ def group_dicoms_into_seqinfos(
482
482
or 'MOCO' in image_type
483
483
info = SeqInfo (
484
484
total ,
485
- os .path .split (files [0 ])[1 ],
485
+ os .path .split (series_files [0 ])[1 ],
486
486
series_id ,
487
- os .path .basename (os .path .dirname (files [0 ])),
487
+ os .path .basename (os .path .dirname (series_files [0 ])),
488
488
'-' , '-' ,
489
489
size [0 ], size [1 ], size [2 ], size [3 ],
490
490
TR , TE ,
@@ -527,13 +527,13 @@ def group_dicoms_into_seqinfos(
527
527
if per_studyUID :
528
528
if studyUID not in seqinfo :
529
529
seqinfo [studyUID ] = ordereddict ()
530
- seqinfo [studyUID ][info ] = files
530
+ seqinfo [studyUID ][info ] = series_files
531
531
elif per_accession_number :
532
532
if accession_number not in seqinfo :
533
533
seqinfo [accession_number ] = ordereddict ()
534
- seqinfo [accession_number ][info ] = files
534
+ seqinfo [accession_number ][info ] = series_files
535
535
else :
536
- seqinfo [info ] = files
536
+ seqinfo [info ] = series_files
537
537
538
538
if per_studyUID :
539
539
lgr .info ("Generated sequence info for %d studies with %d entries total" ,
0 commit comments