Skip to content

Commit cfcb91d

Browse files
committed
fixed conversion int label to string
1 parent 0244983 commit cfcb91d

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

nipype/interfaces/dtitk/registration.py

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,7 @@ class affScalarVolInputSpec(CommandLineInputSpec):
259259
xor=['target', 'translation', 'euler', 'deformation'],
260260
desc='transform to apply: specify an input transformation\
261261
file; parameters input will be ignored',)
262-
'''interpolation = traits.Enum('trilinear', 'NN',
263-
usedefault=True, argstr="-interp %s",
264-
desc='trilinear or nearest neighbor\
265-
interpolation')'''
266-
interpolation = traits.Enum(0, 1,
262+
interpolation = traits.Enum('trilinear', 'NN',
267263
usedefault=True, argstr="-interp %s",
268264
desc='trilinear or nearest neighbor\
269265
interpolation')
@@ -306,10 +302,10 @@ class affScalarVol(CommandLineDtitk):
306302
output_spec = affScalarVolOutputSpec
307303
_cmd = 'affineScalarVolume'
308304

309-
'''def _format_arg(self, name, spec, value):
305+
def _format_arg(self, name, spec, value):
310306
if name == 'interpolation':
311307
value = {'trilinear': 0, 'NN': 1}[value]
312-
super(affScalarVol, self)._format_arg(name, spec, value)'''
308+
return super(affScalarVol, self)._format_arg(name, spec, value)
313309

314310

315311
class diffeoSymTensor3DVolInputSpec(CommandLineInputSpec):
@@ -336,12 +332,9 @@ class diffeoSymTensor3DVolInputSpec(CommandLineInputSpec):
336332
argstr="-vsize %g %g %g", xor=['target'])
337333
flip = traits.Tuple((traits.Int(), traits.Int(), traits.Int()),
338334
exists=True, argstr="-flip %d %d %d")
339-
resampling_type = traits.Enum(1, 0,
335+
resampling_type = traits.Enum('backward', 'forward',
340336
desc='use backward or forward resampling',
341337
exists=True, argstr="-type %s")
342-
'''resampling_type = traits.Enum('backward', 'forward',
343-
desc='use backward or forward resampling',
344-
exists=True, argstr="-type %s")'''
345338

346339

347340
class diffeoSymTensor3DVolOutputSpec(TraitedSpec):
@@ -368,10 +361,10 @@ class diffeoSymTensor3DVol(CommandLineDtitk):
368361
output_spec = diffeoSymTensor3DVolOutputSpec
369362
_cmd = 'deformationSymTensor3DVolume'
370363

371-
'''def _format_arg(self, name, spec, value):
364+
def _format_arg(self, name, spec, value):
372365
if name == 'resampling_type':
373366
value = {'forward': 0, 'backward': 1}[value]
374-
super(diffeoSymTensor3DVol, self)._format_arg(name, spec, value)'''
367+
return super(diffeoSymTensor3DVol, self)._format_arg(name, spec, value)
375368

376369

377370
class diffeoScalarVolInputSpec(CommandLineInputSpec):
@@ -390,17 +383,10 @@ class diffeoScalarVolInputSpec(CommandLineInputSpec):
390383
argstr="-vsize %g %g %g", xor=['target'])
391384
flip = traits.Tuple((traits.Int(), traits.Int(), traits.Int()),
392385
exists=True, argstr="-flip %d %d %d")
393-
'''resampling_type = traits.Enum('backward', 'forward',
386+
resampling_type = traits.Enum('backward', 'forward',
394387
desc='use backward or forward resampling',
395388
exists=True, argstr="-type %s")
396389
interpolation = traits.Enum('trilinear', 'NN',
397-
desc='trilinear, or nearest neighbor',
398-
exists=True, argstr="-interp %s",
399-
usedefault=True)'''
400-
resampling_type = traits.Enum(1, 0,
401-
desc='use backward or forward resampling',
402-
exists=True, argstr="-type %s")
403-
interpolation = traits.Enum(0, 1,
404390
desc='trilinear, or nearest neighbor',
405391
exists=True, argstr="-interp %s",
406392
usedefault=True)
@@ -430,10 +416,10 @@ class diffeoScalarVol(CommandLineDtitk):
430416
output_spec = diffeoScalarVolOutputSpec
431417
_cmd = 'deformationScalarVolume'
432418

433-
'''def _format_arg(self, name, spec, value):
419+
def _format_arg(self, name, spec, value):
434420
if name == 'resampling_type':
435421
value = {'forward': 0, 'backward': 1}[value]
436422
super(diffeoScalarVol, self)._format_arg(name, spec, value)
437423
if name == 'interpolation':
438424
value = {'trilinear': 0, 'NN': 1}[value]
439-
super(diffeoScalarVol, self)._format_arg(name, spec, value)'''
425+
return super(diffeoScalarVol, self)._format_arg(name, spec, value)

0 commit comments

Comments
 (0)