Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH: Modify FSSource to output T2 #868

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading