Skip to content

Commit

Permalink
Merge pull request #402 from mgxd/enh/age-report
Browse files Browse the repository at this point in the history
ENH: Add age to session report
  • Loading branch information
mgxd authored Sep 27, 2024
2 parents 6d778c4 + 954b803 commit 25deabb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nibabies/interfaces/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
\t<ul class="elem-desc">
\t\t<li>Subject ID: {subject_id}</li>
\t\t<li>Session ID: {session_id}</li>
\t\t<li>Chronological age (months): {age}</li>
\t\t<li>Structural images: {num_t1w} T1-weighted, {num_t2w} T2-weighted</li>
\t\t<li>Anatomical reference space: {anat_ref}<li>
\t\t<li>Functional series: {n_bold:d}</li>
Expand Down Expand Up @@ -104,6 +105,7 @@ class SubjectSummaryInputSpec(BaseInterfaceInputSpec):
'mcribs',
desc='surface reconstruction method',
)
age = traits.Int(desc='Chronological age in months at the time of session')


class SubjectSummaryOutputSpec(SummaryOutputSpec):
Expand Down Expand Up @@ -204,6 +206,7 @@ def _generate_segment(self):
return SUBJECT_TEMPLATE.format(
subject_id=self.inputs.subject_id,
session_id=self.inputs.session_id,
age=self.inputs.age,
num_t1w=num_t1w,
num_t2w=num_t2w,
anat_ref=self.inputs.anatomical_reference,
Expand Down
1 change: 1 addition & 0 deletions nibabies/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ def init_single_subject_wf(
recon_method=recon_method,
std_spaces=spaces.get_spaces(nonstandard=False),
nstd_spaces=spaces.get_spaces(standard=False),
age=age,
),
name='summary',
run_without_submitting=True,
Expand Down

0 comments on commit 25deabb

Please sign in to comment.