Skip to content

Commit 7963e31

Browse files
committed
FIX: Partial rollback of N4BiasFieldCorrection
In the last maintenance (#3180) of the interface, we eliminated an important section of the ``_list_outputs``: 6979cbd#diff-b6f33a19b0e06b91023416db5faf7323L544-L547 This PR addresses the problem: ``` Execution Outputs ----------------- * bias_image : <undefined> * output_image : /home/oesteban/tmp/fmriprep-ds005/fprep-work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/brain_extraction_wf/inu_n4_final/mapflow/_inu_n4_final0/sub-01_T1w_cor rected.nii.gz Runtime info ------------ * cmdline : N4BiasFieldCorrection --bspline-fitting [ 200 ] -d 3 --input-image /oak/stanford/groups/russpold/data/openfmri/ds000005/sub-01/anat/sub-01_T1w.nii.gz --convergence [ 50x 50x50x50x50, 1e-07 ] --output [ sub-01_T1w_corrected.nii.gz, sub-01_T1w_bias.nii.gz ] -r --shrink-factor 4 --weight-image /home/oesteban/tmp/fmriprep-ds005/fprep-work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/brain_extraction_wf/atropos_wf/copy_xform/09_relabel_wm_maths_xform.nii.gz * duration : 15.334786 * hostname : dendrite * prev_wd : /home/oesteban/tmp/fmriprep-ds005 * working_dir : /home/oesteban/tmp/fmriprep-ds005/fprep-work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/brain_extraction_wf/inu_n4_final/mapflow/_inu_n4_final0 ``` (`bias_image` should be `'sub-01_T1w_bias.nii.gz'` given the `cmdline`)
1 parent 75b598a commit 7963e31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nipype/interfaces/ants/segmentation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,11 @@ def _parse_inputs(self, skip=None):
537537
self._out_bias_file = bias_image
538538
return super(N4BiasFieldCorrection, self)._parse_inputs(skip=skip)
539539

540+
def _list_outputs(self):
541+
outputs = super(N4BiasFieldCorrection, self)._list_outputs()
542+
if self._out_bias_file:
543+
outputs["bias_image"] = os.path.abspath(self._out_bias_file)
544+
return outputs
540545

541546
class CorticalThicknessInputSpec(ANTSCommandInputSpec):
542547
dimension = traits.Enum(

0 commit comments

Comments
 (0)