Skip to content

Commit

Permalink
PATCH: Modify FSSource to output T2
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Apr 18, 2024
1 parent 830b4fc commit 46e911b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions niworkflows/interfaces/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

from numpy.linalg.linalg import LinAlgError
from nipype.algorithms import confounds as nac
from nipype.interfaces import io as nio
from nipype.interfaces.base import File


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

return runtime


class _FSSourceOutputSpec(nio.FSSourceOutputSpec):
T2 = File(desc='Intensity normalized whole-head volume', loc='mri')


class FreeSurferSource(nio.FreeSurferSource):
"""
Patch to allow grabbing the T2 volume, if available
"""

output_spec = _FSSourceOutputSpec

0 comments on commit 46e911b

Please sign in to comment.