Skip to content

Commit ad0fb28

Browse files
committed
Going back to distinguishing affine transformations by names. Improved
docs.
1 parent a8461ff commit ad0fb28

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nipype/interfaces/ants/resampling.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,12 @@ class WarpImageMultiTransformInputSpec(ANTSCommandInputSpec):
129129
desc='transformation file(s) to be applied',
130130
mandatory=True)
131131
invert_affine = traits.List(traits.Int,
132-
desc=('List of Affine transformations to invert. '
132+
desc=('List of Affine transformations to invert.'
133133
'E.g.: [1,4,5] inverts the 1st, 4th, and 5th Affines '
134-
'found in transformation_series'))
134+
'found in transformation_series. Note that indexing '
135+
'starts with 1 and does not include warp fields. Affine '
136+
'transformations are distinguished '
137+
'from warp fields by the word "affine" included in their filenames.'))
135138

136139
class WarpImageMultiTransformOutputSpec(TraitedSpec):
137140
output_image = File(exists=True, desc='Warped image')
@@ -175,7 +178,7 @@ def _format_arg(self, opt, spec, val):
175178
series = []
176179
affine_counter = 0
177180
for transformation in val:
178-
if transformation.lower().endswith("txt") and \
181+
if "affine" in transformation.lower() and \
179182
isdefined(self.inputs.invert_affine):
180183
affine_counter += 1
181184
if affine_counter in self.inputs.invert_affine:

0 commit comments

Comments
 (0)