|
5 | 5 | import os
|
6 | 6 | import time
|
7 | 7 |
|
8 |
| -# from collections import Counter |
9 | 8 | from nipype.interfaces.base import (
|
10 | 9 | traits, TraitedSpec, BaseInterfaceInputSpec,
|
11 | 10 | File, Directory, InputMultiObject, Str, isdefined,
|
12 | 11 | SimpleInterface)
|
13 | 12 | from nipype.interfaces import freesurfer as fs
|
14 |
| -# from niworkflows.utils.bids import BIDS_NAME |
15 | 13 |
|
16 | 14 |
|
17 | 15 | SUBJECT_TEMPLATE = """\
|
@@ -104,28 +102,14 @@ def _generate_segment(self):
|
104 | 102 | if self.inputs.t2w:
|
105 | 103 | t2w_seg = '(+ {:d} T2-weighted)'.format(len(self.inputs.t2w))
|
106 | 104 |
|
107 |
| - # Add list of tasks with number of runs |
108 | 105 | dwi_files = self.inputs.dwi if isdefined(self.inputs.dwi) else []
|
109 | 106 | dwi_files = [s[0] if isinstance(s, list) else s for s in dwi_files]
|
110 | 107 |
|
111 |
| - # counts = Counter(BIDS_NAME.search(series).groupdict()['task_id'][5:] |
112 |
| - # for series in dwi_files) |
113 |
| - |
114 |
| - # tasks = '' |
115 |
| - # if counts: |
116 |
| - # header = '\t\t<ul class="elem-desc">' |
117 |
| - # footer = '\t\t</ul>' |
118 |
| - # lines = ['\t\t\t<li>Task: {task_id} ({n_runs:d} run{s})</li>'.format( |
119 |
| - # task_id=task_id, n_runs=n_runs, s='' if n_runs == 1 else 's') |
120 |
| - # for task_id, n_runs in sorted(counts.items())] |
121 |
| - # tasks = '\n'.join([header] + lines + [footer]) |
122 |
| - |
123 | 108 | return SUBJECT_TEMPLATE.format(
|
124 | 109 | subject_id=self.inputs.subject_id,
|
125 | 110 | n_t1s=len(self.inputs.t1w),
|
126 | 111 | t2w=t2w_seg,
|
127 | 112 | n_dwi=len(dwi_files),
|
128 |
| - # tasks=tasks, |
129 | 113 | std_spaces=', '.join(self.inputs.std_spaces),
|
130 | 114 | nstd_spaces=', '.join(self.inputs.nstd_spaces),
|
131 | 115 | freesurfer_status=freesurfer_status)
|
|
0 commit comments