Skip to content

Commit 25deabb

Browse files
authored
Merge pull request #402 from mgxd/enh/age-report
ENH: Add age to session report
2 parents 6d778c4 + 954b803 commit 25deabb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

nibabies/interfaces/reports.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
\t<ul class="elem-desc">
2929
\t\t<li>Subject ID: {subject_id}</li>
3030
\t\t<li>Session ID: {session_id}</li>
31+
\t\t<li>Chronological age (months): {age}</li>
3132
\t\t<li>Structural images: {num_t1w} T1-weighted, {num_t2w} T2-weighted</li>
3233
\t\t<li>Anatomical reference space: {anat_ref}<li>
3334
\t\t<li>Functional series: {n_bold:d}</li>
@@ -104,6 +105,7 @@ class SubjectSummaryInputSpec(BaseInterfaceInputSpec):
104105
'mcribs',
105106
desc='surface reconstruction method',
106107
)
108+
age = traits.Int(desc='Chronological age in months at the time of session')
107109

108110

109111
class SubjectSummaryOutputSpec(SummaryOutputSpec):
@@ -204,6 +206,7 @@ def _generate_segment(self):
204206
return SUBJECT_TEMPLATE.format(
205207
subject_id=self.inputs.subject_id,
206208
session_id=self.inputs.session_id,
209+
age=self.inputs.age,
207210
num_t1w=num_t1w,
208211
num_t2w=num_t2w,
209212
anat_ref=self.inputs.anatomical_reference,

nibabies/workflows/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ def init_single_subject_wf(
381381
recon_method=recon_method,
382382
std_spaces=spaces.get_spaces(nonstandard=False),
383383
nstd_spaces=spaces.get_spaces(standard=False),
384+
age=age,
384385
),
385386
name='summary',
386387
run_without_submitting=True,

0 commit comments

Comments
 (0)