Skip to content

Commit 4c4bd89

Browse files
authored
PATCH: Modify FSSource to output T2 (#868)
1 parent a9f00d5 commit 4c4bd89

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

niworkflows/interfaces/patches.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
from numpy.linalg.linalg import LinAlgError
2929
from nipype.algorithms import confounds as nac
30+
from nipype.interfaces import io as nio
31+
from nipype.interfaces.base import File
3032

3133

3234
class RobustACompCor(nac.ACompCor):
@@ -73,3 +75,15 @@ def _run_interface(self, runtime):
7375
sleep(randint(start + 4, start + 10))
7476

7577
return runtime
78+
79+
80+
class _FSSourceOutputSpec(nio.FSSourceOutputSpec):
81+
T2 = File(desc='Intensity normalized whole-head volume', loc='mri')
82+
83+
84+
class FreeSurferSource(nio.FreeSurferSource):
85+
"""
86+
Patch to allow grabbing the T2 volume, if available
87+
"""
88+
89+
output_spec = _FSSourceOutputSpec

0 commit comments

Comments
 (0)