Description
Summary
The behavior of list outputs from Nipype MRIConvert interface is different from the one of freesurfer mri_convert function at least for spm (img + hdr) files. The interface ouput file as an index but freesurfer files doesn't. Problem may comes from this line.
Actual behavior
traits.trait_errors.TraitError: The trait 'out_file' of a MRIConvertOutputSpec instance is an existing file name, but the path '/home/vferat/aparc+aseg_out001.img' does not exist.
Nipype interface list output like
- [input file name] + _out001.img
while freesurfer outputs files named:
- [input file name] + _out.img
- [input file name] + _out.hdr
Expected behavior
Filename from freesurfer output and Nipype MRIConvert interface should be the same
How to replicate the behavior
from nipype.interfaces import freesurfer
mc = freesurfer.MRIConvert()
mc.inputs.in_file = "aparc+aseg.mgz"
mc.inputs.out_type = 'spm'
mc.cmdline
mc.run()
Platform details:
freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c
commit_source': 'installation', 'commit_hash': 'a0f756d1c', 'nipype_version': '1.2.0', 'sys_version': '3.6.8 (default, Jan 14 2019, 11:02:34) \n[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]', 'sys_executable': '/usr/bin/python3', 'sys_platform': 'linux', 'numpy_version': '1.17.0', 'scipy_version': '1.3.0', 'networkx_version': '2.3', 'nibabel_version': '2.5.0', 'traits_version': '5.1.2'}
Execution environment
- My python environment outside container : Python 3.6.8 (default, Jan 14 2019, 11:02:34)