From efd29c6096ca34c9a6d75790e53beb9ea2d1811b Mon Sep 17 00:00:00 2001 From: Mathias Goncalves Date: Wed, 5 Jun 2024 16:10:07 -0400 Subject: [PATCH] PATCH: Modify FSSource to output T2 (#868) --- niworkflows/interfaces/patches.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/niworkflows/interfaces/patches.py b/niworkflows/interfaces/patches.py index 32dcde711b7..d72764a2335 100644 --- a/niworkflows/interfaces/patches.py +++ b/niworkflows/interfaces/patches.py @@ -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): @@ -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