You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am writing a diffusion processing workflow, and wants to use the freesurfer.TKregister2 interface for transforming a freesurfer transformation matrix to a fsl one. I see that the fsl_out option can be set to True according to the documentation ( and from the Tkregister2InputSpec code). However, doing that gives an error.
The causes seem to be these lines in nipype/interfaces/freesurfer/utils.py:
So, with 'fsl_out=True', TKregister2._list_outputs sets up the output field 'fsl_file' and returns a dictionary (I think?) updated with a key called fsl_file. However, the key fsl_out is checked in TKregister2._format_arg which is not set.
Actual behavior
These errors were generated by nipype:
Traceback: Traceback (most recent call last): File "/home/jwu/.venvs/mpp-dwi-proc/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 935, in _parse_inputs arg = self._format_arg(name, spec, value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jwu/.venvs/mpp-dwi-proc/lib/python3.11/site-packages/nipype/interfaces/freesurfer/utils.py", line 1970, in _format_arg value = self._list_outputs()[name] ~~~~~~~~~~~~~~~~~~~~^^^^^^ KeyError: 'fsl_out' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/jwu/.venvs/mpp-dwi-proc/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 735, in _run_interface runtime.cmdline = self.cmdline ^^^^^^^^^^^^ File "/home/jwu/.venvs/mpp-dwi-proc/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 660, in cmdline allargs = [self._cmd_prefix + self.cmd] + self._parse_inputs() ^^^^^^^^^^^^^^^^^^^^ File "/home/jwu/.venvs/mpp-dwi-proc/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 937, in _parse_inputs raise ValueError( ValueError: Error formatting command line argument 'fsl_out' with value 'True' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/jwu/.venvs/mpp-dwi-proc/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 397, in run runtime = self._run_interface(runtime) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jwu/.venvs/mpp-dwi-proc/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 737, in _run_interface raise RuntimeError( RuntimeError: Error raised when interpolating the command line
Expected behavior
This option should set a file value for the output field fsl_file without error
How to replicate the behavior
This should replicate with any moving image and reg file:
Summary
Hi! I am writing a diffusion processing workflow, and wants to use the
freesurfer.TKregister2
interface for transforming a freesurfer transformation matrix to a fsl one. I see that thefsl_out
option can be set to True according to the documentation ( and from theTkregister2InputSpec
code). However, doing that gives an error.The causes seem to be these lines in nipype/interfaces/freesurfer/utils.py:
TKregister2._format_arg
)TKregister2._list_outputs
)So, with 'fsl_out=True',
TKregister2._list_outputs
sets up the output field 'fsl_file' and returns a dictionary (I think?) updated with a key calledfsl_file
. However, the keyfsl_out
is checked inTKregister2._format_arg
which is not set.Actual behavior
These errors were generated by nipype:
Expected behavior
This option should set a file value for the output field
fsl_file
without errorHow to replicate the behavior
This should replicate with any moving image and reg file:
Script/Workflow details
Platform details:
Execution environment
The text was updated successfully, but these errors were encountered: