8000 FIX: Check for non-mandatory output in DWIBiasCorrect by MatthieuJoulot · Pull Request #3523 · nipy/nipype · GitHub
[go: up one dir, main page]

Skip to content

FIX: Check for non-mandatory output in DWIBiasCorrect #3523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 17, 2022
Merged
Changes from 1 commit
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
Next Next commit
Fix non mandatory output issue in DWIBiasCorrect
The function `_list_outputs` in `DWIBiasCorrect` doesn't take into account the fact that `output_file` is not a mandatory input, thus making any pipeline using this interface without specifying the output crash.
  • Loading branch information
MatthieuJoulot authored Sep 28, 2022
commit 07f460168cdc52ca309cd7826e35ec416be05212
11 changes: 6 additions & 5 deletions nipype/interfaces/mrtrix3/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,12 @@ def _format_arg(self, name, trait_spec, value):
return super()._format_arg(name, trait_spec, value)

def _list_outputs(self):
outputs = self.output_spec().get()
outputs["out_file"] = op.abspath(self.inputs.out_file)
if self.inputs.bias:
outputs["bias"] = op.abspath(self.inputs.bias)
return outputs
if self.inputs.out_file:
outputs = self.output_spec().get()
outputs["out_file"] = op.abspath(self.inputs.out_file)
if self.inputs.bias:
outputs["bias"] = op.abspath(self.inputs.bias)
return outputs


class DWIPreprocInputSpec(MRTrix3BaseInputSpec):
Expand Down
0