Hi
# fsl ChangeDataType
fsl_cdt = pe.Node(interface = fsl.ChangeDataType(), name = 'fsl_ChangeDataType')
fsl_cdt.inputs.output_datatype = 'int'
#fsl_cdt.inputs.out_file = 'brain_mask_int.nii.gz'
The partial code above raise an error as follows:
TraitError: The 'out_file' trait of a MathsOutput instance must be an existing file name, but a value of '/tmp/tmpszGGQm/bs_pipeline/fsl_ChangeDataType/brain_mask_chdt.nii.gz' <type 'str'> was specified.
As you can see from the partial code, I didn't specify the 'out_file'.
The 'out_file'
=brain_mask_chdt.nii.gz is its default name with the input brain_mask_nii.gz.
1-) sometimes it gives this error and sometimes does not even though I don't change the code. Why it behaves such a strange way?
2-) I want to specify output name but it gives the same error. Can't I use the 'out_file' instead of renaming the output with Rename() ?
3-) What is the difference between outputs.out_file and inputs.out_file?
P.S > I encountered the same error with the other functions.
Regards
Yasin