I thought I had it, but I don't. I still can't get the "inverse_warp" field to be anything, but <undefined> though the command line command populates correctly now with _gen_filename. Any ideas would be appreciated. Here's some of the relevant code and report.rst output:
Original Inputs
---------------
* absolute : <undefined>
* args : <undefined>
* environ : {'FSLOUTPUTTYPE': 'NIFTI_GZ'}
* ignore_exception : False
* inverse_warp : <undefined>
* jacobian_max : <undefined>
* jacobian_min : <undefined>
* niter : <undefined>
* noconstraint : <undefined>
* output_type : NIFTI_GZ
* reference : /path/to/sequence_mean_chpixdim_brain_chpixdim_flirt.nii.gz
* regularise : <undefined>
* relative : <undefined>
* terminal_output : none
* warp : /path/to/mp_rage_p2_fieldwarp.nii.gz
Execution Inputs
----------------
* absolute : <undefined>
* args : <undefined>
* environ : {'FSLOUTPUTTYPE': 'NIFTI_GZ'}
* ignore_exception : False
* inverse_warp : <undefined>
* jacobian_max : <undefined>
* jacobian_min : <undefined>
* niter : <undefined>
* noconstraint : <undefined>
* output_type : NIFTI_GZ
* reference : /path/to/sequence_mean_chpixdim_brain_chpixdim_flirt.nii.gz
* regularise : <undefined>
* relative : <undefined>
* terminal_output : none
* warp : /path/to/mp_rage_p2_fieldwarp.nii.gz
Execution Outputs
-----------------
* inverse_warp : <undefined>
Runtime info
------------
* command : invwarp --out=/path/to/mp_rage_p2_fieldwarp_inv.nii.gz --ref=/path/to/sequence_mean_chpixdim_brain_chpixdim_flirt.nii.gz --warp=/path/to/mp_rage_p2_fieldwarp.nii.gz
* duration : 844.932158947
* hostname : blah
CODE (in class InvWarp(FSLCommand)):
def _list_outputs(self):
outputs = self.output_spec().get()
if not outputs['inverse_warp']:
outputs['inverse_warp'] = self.inputs.inverse_warp
return outputs