@@ -44,7 +44,7 @@ class RigidTask(CommandLineDtitk):
44
44
>>> import nipype.interfaces.dtitk as dtitk
45
45
>>> node = dtitk.RigidTask()
46
46
>>> node.inputs.fixed_file = 'diffusion.nii.gz'
47
- >>> node.inputs.moving_file = 'diffusion .nii.gz'
47
+ >>> node.inputs.moving_file = 'diffusion2 .nii.gz'
48
48
>>> node.inputs.similarity_metric = 'EDS'
49
49
>>> node.inputs.samplingX = 4
50
50
>>> node.inputs.samplingY = 4
@@ -106,7 +106,7 @@ class AffineTask(CommandLineDtitk):
106
106
>>> import nipype.interfaces.dtitk as dtitk
107
107
>>> node = dtitk.AffineTask()
108
108
>>> node.inputs.fixed_file = 'diffusion.nii.gz'
109
- >>> node.inputs.moving_file = 'diffusion .nii.gz'
109
+ >>> node.inputs.moving_file = 'diffusion2 .nii.gz'
110
110
>>> node.inputs.similarity_metric = 'EDS'
111
111
>>> node.inputs.samplingX = 4
112
112
>>> node.inputs.samplingY = 4
@@ -129,16 +129,23 @@ def _list_outputs(self):
129
129
130
130
131
131
class DiffeoInputSpec (CommandLineInputSpec ):
132
- in_fixed_tensor = traits .Str (desc = "fixed diffusion tensor image" ,
133
- exists = True , mandatory = False , position = 0 ,
134
- argstr = "%s" )
135
- in_moving_txt = traits .Str (desc = "moving list of diffusion tensor image "
136
- "paths" , exists = True , mandatory = False ,
137
- position = 1 , argstr = "%s" )
138
- in_mask = traits .Str (desc = "mask" , exists = True , mandatory = False , position = 2 ,
139
- argstr = "%s" )
140
- in_numbers = traits .Str (desc = '#iters ftol' , exists = True , mandatory = False ,
141
- position = 3 , argstr = "%s" )
132
+ fixed_file = traits .Str (desc = "fixed diffusion tensor image" ,
133
+ exists = True , mandatory = False , position = 0 ,
134
+ argstr = "%s" )
135
+ moving_file = traits .Str (desc = "moving diffusion tensor image" ,
136
+ exists = True , mandatory = False ,
137
+ position = 1 , argstr = "%s" )
138
+ mask = traits .Str (desc = "mask" , exists = True , mandatory = False , position = 2 ,
139
+ argstr = "%s" )
140
+ legacy = traits .Float (desc = "legacy parameter; always set to 1" ,
141
+ exists = True , mandatory = True ,
142
+ position = 3 , default_value = 1 , argstr = "%s" )
143
+ n_iters = traits .Float (desc = "number of iterations" ,
144
+ exists = True , mandatory = True ,
145
+ position = 4 , default_value = 6 , argstr = "%s" )
146
+ ftol = traits .Float (desc = "iteration for the optimization to stop" ,
147
+ exists = True , mandatory = True ,
148
+ position = 5 , default_value = 0.002 , argstr = "%s" )
142
149
143
150
144
151
class DiffeoOutputSpec (TraitedSpec ):
@@ -155,22 +162,24 @@ class DiffeoTask(CommandLineDtitk):
155
162
156
163
>>> import nipype.interfaces.dtitk as dtitk
157
164
>>> node = dtitk.DiffeoTask()
158
- >>> node.inputs.in_fixed_tensor = 'diffusion.nii'
159
- >>> node.inputs.in_moving_txt = 'dirs.txt'
160
- >>> node.inputs.in_mask = 'mask.nii'
161
- >>> node.inputs.in_numbers = '6 0.002'
165
+ >>> node.inputs.fixed_file = 'diffusion.nii.gz'
166
+ >>> node.inputs.moving_file = 'diffusion2.nii.gz'
167
+ >>> node.inputs.mask = 'mask.nii.gz'
168
+ >>> node.inputs.legacy = 1
169
+ >>> node.inputs.n_iters = 6
170
+ >>> node.inputs.ftol = 0.002
162
171
>>> node.run() # doctest: +SKIP
163
172
"""
164
173
input_spec = DiffeoInputSpec
165
174
output_spec = DiffeoOutputSpec
166
- _cmd = 'dti_diffeomorphic_sn '
175
+ _cmd = 'dti_diffeomorphic_reg '
167
176
168
177
def _list_outputs (self ):
169
178
outputs = self .output_spec ().get ()
170
- outputs ['out_file_xfm' ] = self .inputs .in_fixed_tensor .replace (
171
- '.nii.gz' , '_aff_diffeo .df.nii.gz' )
172
- outputs ['out_file' ] = self .inputs .in_fixed_tensor .replace (
173
- '.nii.gz' , '_aff_diffeo .nii.gz' )
179
+ outputs ['out_file_xfm' ] = self .inputs .moving_file .replace (
180
+ '.nii.gz' , '_diffeo .df.nii.gz' )
181
+ outputs ['out_file' ] = self .inputs .moving_file .replace (
182
+ '.nii.gz' , '_diffeo .nii.gz' )
174
183
return outputs
175
184
176
185
0 commit comments