@@ -122,7 +122,7 @@ class RegResample(NiftyRegCommand):
122122 # Need this overload to properly constraint the interpolation type input
123123 def _format_arg (self , name , spec , value ):
124124 if name == 'inter_val' :
125- inter_val = {'NN' : 0 , 'LIN' : 1 , 'CUB' : 3 , 'SINC' : 5 }
125+ inter_val = {'NN' : 0 , 'LIN' : 1 , 'CUB' : 3 , 'SINC' : 4 }
126126 return spec .argstr % inter_val [value ]
127127 else :
128128 return super (RegResample , self )._format_arg (name , spec , value )
@@ -295,6 +295,15 @@ class RegToolsInputSpec(NiftyRegCommandInputSpec):
295295 desc = desc ,
296296 argstr = '-smoG %f %f %f' )
297297
298+ # Interpolation type
299+ inter_val = traits .Enum (
300+ 'NN' ,
301+ 'LIN' ,
302+ 'CUB' ,
303+ 'SINC' ,
304+ desc = 'Interpolation order to use to warp the floating image' ,
305+ argstr = '-interp %d' )
306+
298307
299308class RegToolsOutputSpec (TraitedSpec ):
300309 """ Output Spec for RegTools. """
@@ -326,6 +335,14 @@ class RegTools(NiftyRegCommand):
326335 output_spec = RegToolsOutputSpec
327336 _suffix = '_tools'
328337
338+ # Need this overload to properly constraint the interpolation type input
339+ def _format_arg (self , name , spec , value ):
340+ if name == 'inter_val' :
341+ inter_val = {'NN' : 0 , 'LIN' : 1 , 'CUB' : 3 , 'SINC' : 4 }
342+ return spec .argstr % inter_val [value ]
343+ else :
344+ return super (RegTools , self )._format_arg (name , spec , value )
345+
329346
330347class RegAverageInputSpec (NiftyRegCommandInputSpec ):
331348 """ Input Spec for RegAverage. """
0 commit comments