Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions nipype/interfaces/fsl/epi.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,10 @@ class EddyInputSpec(FSLCommandInputSpec):
"the field specified by --field and first volume "
"in file --imain")
use_cuda = traits.Bool(False, desc="Run eddy using cuda gpu")
cnr_maps = traits.Bool(
False, desc='Output CNR-Maps', argstr='--cnr_maps', min_ver='5.0.10')
residuals = traits.Bool(
False, desc='Output Residuals', argstr='--residuals', min_ver='5.0.10')


class EddyOutputSpec(TraitedSpec):
Expand All @@ -685,6 +689,10 @@ class EddyOutputSpec(TraitedSpec):
exists=True,
desc=('Text-file with a plain language report on what '
'outlier slices eddy has found'))
out_cnr_maps = File(
exists=True, desc='path/name of file with the cnr_maps')
out_residuals = File(
exists=True, desc='path/name of file with the residuals')


class Eddy(FSLCommand):
Expand Down Expand Up @@ -787,6 +795,16 @@ def _list_outputs(self):
self.inputs.out_base)
out_outlier_report = os.path.abspath(
'%s.eddy_outlier_report' % self.inputs.out_base)
if isdefined(self.inputs.cnr_maps) and self.inputs.cnr_maps:
out_cnr_maps = os.path.abspath(
'%s.eddy_cnr_maps.nii.gz' % self.inputs.out_base)
if os.path.exists(out_cnr_maps):
outputs['out_cnr_maps'] = out_cnr_maps
if isdefined(self.inputs.residuals) and self.inputs.residuals:
out_residuals = os.path.abspath(
'%s.eddy_residuals.nii.gz' % self.inputs.out_base)
if os.path.exists(out_residuals):
outputs['out_residuals'] = out_residuals

if os.path.exists(out_rotated_bvecs):
outputs['out_rotated_bvecs'] = out_rotated_bvecs
Expand Down
4 changes: 4 additions & 0 deletions nipype/interfaces/fsl/tests/test_auto_Eddy.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def test_Eddy_inputs():
session=dict(argstr='--session=%s', ),
slm=dict(argstr='--slm=%s', ),
use_cuda=dict(),
cnr_maps=dict(argstr='--cnr_maps', min_ver='5.0.10', ),
residuals=dict(argstr='--residuals', min_ver='5.0.10', ),
)
inputs = Eddy.input_spec()

Expand All @@ -89,6 +91,8 @@ def test_Eddy_outputs():
out_restricted_movement_rms=dict(),
out_rotated_bvecs=dict(),
out_shell_alignment_parameters=dict(),
out_cnr_maps=dict(),
out_residuals=dict(),
)
outputs = Eddy.output_spec()

Expand Down