Skip to content

Commit b55b892

Browse files
committed
BF: fixup for recent RF fl -> files which collided with use of files later in the code
1 parent 4cdb33d commit b55b892

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bin/heudiconv

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def group_dicoms_into_seqinfos(
450450
# nothing to see here, just move on
451451
continue
452452
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]
454454
# turn the series_id into a human-readable string -- string is needed
455455
# for JSON storage later on
456456
if per_studyUID:
@@ -460,7 +460,7 @@ def group_dicoms_into_seqinfos(
460460

461461
series_id = '-'.join(map(str, series_id))
462462

463-
size = list(mw.image_shape) + [len(files)]
463+
size = list(mw.image_shape) + [len(series_files)]
464464
total += size[-1]
465465
if len(size) < 4:
466466
size.append(1)
@@ -482,9 +482,9 @@ def group_dicoms_into_seqinfos(
482482
or 'MOCO' in image_type
483483
info = SeqInfo(
484484
total,
485-
os.path.split(files[0])[1],
485+
os.path.split(series_files[0])[1],
486486
series_id,
487-
os.path.basename(os.path.dirname(files[0])),
487+
os.path.basename(os.path.dirname(series_files[0])),
488488
'-', '-',
489489
size[0], size[1], size[2], size[3],
490490
TR, TE,
@@ -527,13 +527,13 @@ def group_dicoms_into_seqinfos(
527527
if per_studyUID:
528528
if studyUID not in seqinfo:
529529
seqinfo[studyUID] = ordereddict()
530-
seqinfo[studyUID][info] = files
530+
seqinfo[studyUID][info] = series_files
531531
elif per_accession_number:
532532
if accession_number not in seqinfo:
533533
seqinfo[accession_number] = ordereddict()
534-
seqinfo[accession_number][info] = files
534+
seqinfo[accession_number][info] = series_files
535535
else:
536-
seqinfo[info] = files
536+
seqinfo[info] = series_files
537537

538538
if per_studyUID:
539539
lgr.info("Generated sequence info for %d studies with %d entries total",

0 commit comments

Comments
 (0)