11
11
12
12
import os
13
13
14
- from ...utils .filemanip import split_filename
15
- from ..base import (TraitedSpec , File , traits , isdefined , InputMultiPath ,
16
- CommandLine , CommandLineInputSpec )
14
+ from ..base import (TraitedSpec , File , traits , isdefined , InputMultiPath )
17
15
from .base import ANTSCommand , ANTSCommandInputSpec
18
16
19
17
@@ -101,7 +99,8 @@ def _list_outputs(self):
101
99
class MultiplyImagesInputSpec (ANTSCommandInputSpec ):
102
100
dimension = traits .Enum (3 , 2 , argstr = '%d' , usedefault = False , mandatory = True , position = 0 ,
103
101
desc = 'image dimension (2 or 3)' )
104
- first_input = File (argstr = '%s' , exists = True , mandatory = True , position = 1 , desc = 'image 1' )
102
+ first_input = File (argstr = '%s' , exists = True ,
103
+ mandatory = True , position = 1 , desc = 'image 1' )
105
104
second_input = traits .Either (File (exists = True ), traits .Float , argstr = '%s' , mandatory = True , position = 2 ,
106
105
desc = 'image 2 or multiplication weight' )
107
106
output_product_image = File (argstr = '%s' , mandatory = True , position = 3 ,
@@ -138,22 +137,25 @@ def _list_outputs(self):
138
137
self .inputs .output_product_image )
139
138
return outputs
140
139
140
+
141
141
class CreateJacobianDeterminantImageInputSpec (ANTSCommandInputSpec ):
142
142
imageDimension = traits .Enum (3 , 2 , argstr = '%d' , usedefault = False , mandatory = True ,
143
- position = 0 , desc = 'image dimension (2 or 3)' )
143
+ position = 0 , desc = 'image dimension (2 or 3)' )
144
144
deformationField = File (argstr = '%s' , exists = True , mandatory = True ,
145
- position = 1 , desc = 'deformation transformation file' )
145
+ position = 1 , desc = 'deformation transformation file' )
146
146
outputImage = File (argstr = '%s' , mandatory = True ,
147
- position = 2 ,
148
- desc = 'output filename' )
147
+ position = 2 ,
148
+ desc = 'output filename' )
149
149
doLogJacobian = traits .Enum (0 , 1 , argstr = '%d' , position = 3 ,
150
- desc = 'return the log jacobian' )
150
+ desc = 'return the log jacobian' )
151
151
useGeometric = traits .Enum (0 , 1 , argstr = '%d' , position = 4 ,
152
- desc = 'return the geometric jacobian' )
152
+ desc = 'return the geometric jacobian' )
153
+
153
154
154
155
class CreateJacobianDeterminantImageOutputSpec (TraitedSpec ):
155
156
jacobian_image = File (exists = True , desc = 'jacobian image' )
156
157
158
+
157
159
class CreateJacobianDeterminantImage (ANTSCommand ):
158
160
"""
159
161
Examples
@@ -203,6 +205,7 @@ class AffineInitializerInputSpec(ANTSCommandInputSpec):
203
205
desc = ' determines if a local optimization is run at each search point for the set '
204
206
'number of iterations' )
205
207
208
+
206
209
class AffineInitializerOutputSpec (TraitedSpec ):
207
210
out_file = File (desc = 'output transform file' )
208
211
@@ -231,9 +234,10 @@ class ComposeMultiTransformInputSpec(ANTSCommandInputSpec):
231
234
dimension = traits .Enum (3 , 2 , argstr = '%d' , usedefault = True , mandatory = True ,
232
235
position = 0 , desc = 'image dimension (2 or 3)' )
233
236
output_transform = File (argstr = '%s' , mandatory = True , position = 1 ,
234
- desc = 'Outputfname.txt: the name of the resulting transform.' )
237
+ name_source = ['transforms' ], name_template = '%s_composed' ,
238
+ desc = 'the name of the resulting transform.' )
235
239
reference_image = File (argstr = '%s' , mandatory = False , position = 2 ,
236
- desc = 'Reference image (only necessary when output is warpfield)' )
240
+ desc = 'Reference image (only necessary when output is warpfield)' )
237
241
transforms = InputMultiPath (File (exists = True ), argstr = '%s' , mandatory = True ,
238
242
position = 3 , desc = 'transforms to average' )
239
243
@@ -258,4 +262,3 @@ class ComposeMultiTransform(ANTSCommand):
258
262
259
263
def _format_arg (self , opt , spec , val ):
260
264
return super (ComposeMultiTransform , self )._format_arg (opt , spec , val )
261
-
0 commit comments