Skip to content

Commit ecb3713

Browse files
committed
antsIntroduction handles RA and RI transformations
when generating the _list_outputs if -t RA or -t RI is set, *_warp_field outputs will not be required
1 parent fcae401 commit ecb3713

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

nipype/interfaces/ants/legacy.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,20 @@ class antsIntroduction(ANTSCommand):
9494

9595
def _list_outputs(self):
9696
outputs = self._outputs().get()
97+
transmodel = self.inputs.transformation_model
98+
99+
# When transform is set as 'RI'/'RA', no wrap fields will be outputed
100+
if transmodel not in ['RI', 'RA']:
101+
outputs['warp_field'] = os.path.join(os.getcwd(),
102+
self.inputs.out_prefix +
103+
'Warp.nii.gz')
104+
outputs['inverse_warp_field'] = os.path.join(os.getcwd(),
105+
self.inputs.out_prefix +
106+
'InverseWarp.nii.gz')
97107

98108
outputs['affine_transformation'] = os.path.join(os.getcwd(),
99109
self.inputs.out_prefix +
100110
'Affine.txt')
101-
outputs['warp_field'] = os.path.join(os.getcwd(),
102-
self.inputs.out_prefix +
103-
'Warp.nii.gz')
104-
outputs['inverse_warp_field'] = os.path.join(os.getcwd(),
105-
self.inputs.out_prefix +
106-
'InverseWarp.nii.gz')
107111
outputs['input_file'] = os.path.join(os.getcwd(),
108112
self.inputs.out_prefix +
109113
'repaired.nii.gz')

0 commit comments

Comments
 (0)