Skip to content

FSL dtifit add sse to outputspec #2743

Closed
@divetea

Description

@divetea

Summary

nipype's interface for FSL dtifit currently has a parameter "sse" which produces the sum of squared errors. This output does not appear in the OutputSpec.

Actual behavior

You can use the parameter and the image is produced correctly, but there is no way to further connect the output to other nodes, since it is not part of dtifit's official outputs.

Expected behavior

Similar to the tensor file the sse-image should be made available for further processing.

How to replicate the behavior

>>> from nipype.interfaces import fsl
>>> dti = fsl.DTIFit()
>>> dti.inputs.dwi = 'diffusion.nii'
>>> dti.inputs.bvecs = 'bvecs'
>>> dti.inputs.bvals = 'bvals'
>>> dti.inputs.base_name = 'TP'
>>> dti.inputs.mask = 'mask.nii'
>>> dti.inputs.sse = True
>>> dti.save_tensor = True
>>> dti.cmdline
'dtifit -k diffusion.nii -o TP -m mask.nii -r bvecs -b bvals --save_tensor --sse'
>>> out = dti.run()
>>> out.outputs
'FA = private/dtifit__FA.nii.gz
 L1 = private/dtifit__L1.nii.gz
 L2 = private/dtifit__L2.nii.gz
 L3 = private/dtifit__L3.nii.gz
 MD = private/dtifit__MD.nii.gz
 MO = private/dtifit__MO.nii.gz
 S0 = private/dtifit__S0.nii.gz
 V1 = private/dtifit__V1.nii.gz
 V2 = private/dtifit__V2.nii.gz
 V3 = private/dtifit__V3.nii.gz
 tensor = private/dtifit__tensor.nii.gz'

-> sse is missing

Platform details:

This is not platform dependant!
{'commit_hash': '3ec8065',
'commit_source': 'repository',
'networkx_version': '2.1',
'nibabel_version': '2.1.0',
'nipype_version': '1.1.4-dev+g3ec8065',
'numpy_version': '1.15.0',
'pkg_path': 'private/nipype/nipype',
'scipy_version': '1.1.0',
'sys_executable': '/usr/bin/python',
'sys_platform': 'linux2',
'sys_version': '2.7.9 (default, Jun 29 2016, 13:08:31) \n[GCC 4.9.2]',
'traits_version': '4.6.0'}

I have written a fix based on the example of 'save_tensor', but the guidelines say i should open an issue before making a pull request, so here you go ;)
Thanks for the great work so far!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions