@@ -199,3 +199,46 @@ def _list_outputs(self):
199
199
outputs ['jacobian_image' ] = os .path .abspath (
200
200
self ._gen_filename ('output_prefix' ) + 'jacobian.nii.gz' )
201
201
return outputs
202
+
203
+
204
+ class CreateJacobianDeterminantImageInputSpec (ANTSCommandInputSpec ):
205
+ imageDimension = traits .Enum (3 , 2 , argstr = '%d' , usedefault = False , mandatory = True ,
206
+ position = 0 , desc = 'image dimension (2 or 3)' )
207
+ deformationField = File (argstr = '%s' , exists = True , mandatory = True ,
208
+ position = 1 , desc = 'deformation transformation file' )
209
+ outputImage = File (argstr = '%s' , mandatory = True ,
210
+ position = 2 ,
211
+ desc = 'output filename' )
212
+ doLogJacobian = traits .Enum (0 , 1 , argstr = '%d' , mandatory = False , position = 3 ,
213
+ desc = 'return the log jacobian' )
214
+ useGeometric = traits .Enum (0 , 1 , argstr = '%d' , mandatory = False , position = 4 ,
215
+ desc = 'return the geometric jacobian' )
216
+
217
+ class CreateJacobianDeterminantImageOutputSpec (TraitedSpec ):
218
+ jacobian_image = File (exists = True , desc = 'jacobian image' )
219
+
220
+ class CreateJacobianDeterminantImage (ANTSCommand ):
221
+ """
222
+ Examples
223
+ --------
224
+ >>> from nipype.interfaces.ants import CreateJacobianDeterminantImage
225
+ >>> jacobian = CreateJacobianDeterminantImage()
226
+ >>> jacobian.inputs.imageDimension = 3
227
+ >>> jacobian.inputs.warp_file = 'ants_Warp.nii.gz'
228
+ >>> jacobian.inputs.outputImage = 'out_name.nii.gz'
229
+ >>> jacobian.cmdline # doctest: +IGNORE_UNICODE
230
+ 'CreateJacobianDeterminantImage 3 ants_Warp.nii.gz out_name.nii.gz'
231
+ """
232
+
233
+ _cmd = 'CreateJacobianDeterminantImage'
234
+ input_spec = CreateJacobianDeterminantImageInputSpec
235
+ output_spec = CreateJacobianDeterminantImageOutputSpec
236
+
237
+ def _format_arg (self , opt , spec , val ):
238
+ return super (CreateJacobianDeterminantImage , self )._format_arg (opt , spec , val )
239
+
240
+ def _list_outputs (self ):
241
+ outputs = self ._outputs ().get ()
242
+ outputs ['jacobian_image' ] = os .path .abspath (
243
+ self .inputs .outputImage )
244
+ return outputs
0 commit comments