Skip to content

Commit 6a480ee

Browse files
committed
REF: AnalyzeWarp
1 parent ab29ac1 commit 6a480ee

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

nipype/interfaces/elastix/registration.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,36 @@ def _list_outputs(self):
178178
return outputs
179179

180180

181-
class AnalyzeWarpInputSpec(ElastixBaseInputSpec):
182-
transform_file = File(
181+
class AnalyzeWarpInputSpec(ApplyWarpInputSpec):
182+
points = traits.Enum(
183+
'all',
184+
usedefault=True,
185+
position=0,
186+
argstr='-def %s',
187+
desc='transform all points from the input-image, which effectively'
188+
' generates a deformation field.')
189+
jac = traits.Enum(
190+
'all',
191+
usedefault=True,
192+
argstr='-jac %s',
193+
desc='generate an image with the determinant of the spatial Jacobian')
194+
jacmat = traits.Enum(
195+
'all',
196+
usedefault=True,
197+
argstr='-jacmat %s',
198+
desc='generate an image with the spatial Jacobian matrix at each voxel')
199+
moving_image = File(
183200
exists=True,
184-
mandatory=True,
185-
argstr='-tp %s',
186-
desc='transform-parameter file, only 1')
187-
201+
argstr='-in %s',
202+
desc='input image to deform (not used)')
188203

189204
class AnalyzeWarpOutputSpec(TraitedSpec):
190205
disp_field = File(desc='displacements field')
191206
jacdet_map = File(desc='det(Jacobian) map')
192207
jacmat_map = File(desc='Jacobian matrix map')
193208

194209

195-
class AnalyzeWarp(CommandLine):
210+
class AnalyzeWarp(ApplyWarp):
196211
"""
197212
Use transformix to get details from the input transform (generate
198213
the corresponding deformation field, generate the determinant of the
@@ -210,7 +225,6 @@ class AnalyzeWarp(CommandLine):
210225
211226
"""
212227

213-
_cmd = 'transformix -def all -jac all -jacmat all'
214228
input_spec = AnalyzeWarpInputSpec
215229
output_spec = AnalyzeWarpOutputSpec
216230

0 commit comments

Comments
 (0)