diff --git a/docs/workflows.rst b/docs/workflows.rst index 3988a40dc..dbec7f7fe 100644 --- a/docs/workflows.rst +++ b/docs/workflows.rst @@ -568,8 +568,8 @@ A visualization of the AROMA component classification is also included in the HT .. _bold_t2s: -T2* Driven Coregistration -~~~~~~~~~~~~~~~~~~~~~~~~~ +T2*-driven echo combination +~~~~~~~~~~~~~~~~~~~~~~~~~~~ :py:func:`~fmriprep.workflows.bold.t2s.init_bold_t2s_wf` If multi-echo :abbr:`BOLD (blood-oxygen level-dependent)` data is supplied, diff --git a/fmriprep/interfaces/multiecho.py b/fmriprep/interfaces/multiecho.py index 8ef963bff..25fb12ec7 100644 --- a/fmriprep/interfaces/multiecho.py +++ b/fmriprep/interfaces/multiecho.py @@ -16,7 +16,6 @@ """ import os -from nibabel.filename_parser import splitext_addext from nipype import logging from nipype.interfaces.base import ( @@ -39,13 +38,21 @@ class T2SMapInputSpec(CommandLineInputSpec): mandatory=True, minlen=3, desc='echo times') + fittype = traits.Enum('curvefit', 'loglin', + argstr='--fittype %s', + position=3, + usedefault=True, + desc=('Desired fitting method: ' + '"loglin" means that a linear model is fit ' + 'to the log of the data. ' + '"curvefit" means that a more computationally ' + 'demanding monoexponential model is fit ' + 'to the raw data.')) class T2SMapOutputSpec(TraitedSpec): t2star_map = File(exists=True, desc='limited T2* map') - s0_map = File(exists=True, desc='limited s0 map') - t2star_adaptive_map = File(exists=True, desc='adaptive T2* map') - s0_adaptive_map = File(exists=True, desc='adaptive s0 map') + s0_map = File(exists=True, desc='limited S0 map') optimal_comb = File(exists=True, desc='optimally combined ME-EPI time series') @@ -64,7 +71,7 @@ class T2SMap(CommandLine): >>> t2smap.inputs.echo_times = [0.013, 0.027, 0.043] >>> t2smap.cmdline # doctest: +ELLIPSIS 't2smap -d sub-01_run-01_echo-1_bold.nii.gz sub-01_run-01_echo-2_bold.nii.gz \ -sub-01_run-01_echo-3_bold.nii.gz -e 13.0 27.0 43.0' +sub-01_run-01_echo-3_bold.nii.gz -e 13.0 27.0 43.0 --fittype curvefit' """ _cmd = 't2smap' input_spec = T2SMapInputSpec @@ -77,13 +84,8 @@ def _format_arg(self, name, trait_spec, value): def _list_outputs(self): outputs = self._outputs().get() - filename = splitext_addext(os.path.basename(self.inputs.in_files[0]))[0] - out_dir = os.path.abspath('TED.{}'.format(filename)) - - outputs['t2star_map'] = os.path.join(out_dir, 't2sv.nii') - outputs['s0_map'] = os.path.join(out_dir, 's0v.nii') - outputs['t2star_adaptive_map'] = os.path.join(out_dir, 't2svG.nii') - outputs['s0_adaptive_map'] = os.path.join(out_dir, 's0vG.nii') - outputs['optimal_comb'] = os.path.join(out_dir, 'ts_OC.nii') - + out_dir = os.getcwd() + outputs['t2star_map'] = os.path.join(out_dir, 'T2starmap.nii.gz') + outputs['s0_map'] = os.path.join(out_dir, 'S0map.nii.gz') + outputs['optimal_comb'] = os.path.join(out_dir, 'desc-optcom_bold.nii.gz') return outputs diff --git a/fmriprep/workflows/bold/t2s.py b/fmriprep/workflows/bold/t2s.py index 643a6acd6..fd62a830c 100644 --- a/fmriprep/workflows/bold/t2s.py +++ b/fmriprep/workflows/bold/t2s.py @@ -61,7 +61,8 @@ def init_bold_t2s_wf(echo_times, mem_gb, omp_nthreads, workflow = Workflow(name=name) workflow.__desc__ = """\ A T2* map was estimated from the preprocessed BOLD by fitting to a monoexponential signal -decay model with log-linear regression. +decay model with nonlinear regression, using T2*/S0 estimates from a log-linear +regression fit as initial values. For each voxel, the maximal number of echoes with reliable signal in that voxel were used to fit the model. The calculated T2* map was then used to optimally combine preprocessed BOLD across diff --git a/setup.cfg b/setup.cfg index de49db581..1a7777b5c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ install_requires = pyyaml sdcflows @ git+https://github.com/nipreps/sdcflows.git@master smriprep @ git+https://github.com/poldracklab/smriprep.git@master - tedana >= 0.0.5 + tedana >= 0.0.9a1, < 0.0.10 templateflow ~= 0.6 toml test_requires =