class ImageMathInputSpec(ANTSCommandInputSpec): dimension = traits.Int(3, usedefault=True, position=1, argstr='%d', desc='dimension of output image') output_image = base.File(position=2, argstr='%s', name_source=['op1'], name_template='%s_maths', desc='output image file', keep_extension=True) operation = base.Str(mandatory=True, position=3, argstr='%s', desc='operations and intputs') op1 = base.File(exists=True, mandatory=True, position=-2, argstr='%s', desc='first operator') op2 = traits.Either(base.File(exists=True), base.Str, position=-1, argstr='%s', desc='second operator')
class CommandLineInputSpec1(nib.CommandLineInputSpec): foo = nib.Str(argstr='%s', desc='a str') goo = nib.traits.Bool(argstr='-g', desc='a bool', position=0) hoo = nib.traits.List(argstr='-l %s', desc='a list') moo = nib.traits.List(argstr='-i %d...', desc='a repeated list', position=-1) noo = nib.traits.Int(argstr='-x %d', desc='an int') roo = nib.traits.Str(desc='not on command line') soo = nib.traits.Bool(argstr="-soo")
class _ImageMathInputSpec(ANTSCommandInputSpec): dimension = traits.Int(3, usedefault=True, position=1, argstr="%d", desc="dimension of output image") output_image = base.File( position=2, argstr="%s", name_source=["op1"], name_template="%s_maths", desc="output image file", keep_extension=True, ) operation = base.Str(mandatory=True, position=3, argstr="%s", desc="operations and intputs") op1 = base.File(exists=True, mandatory=True, position=-2, argstr="%s", desc="first operator") op2 = traits.Either( base.File(exists=True), base.Str, position=-1, argstr="%s", desc="second operator", ) copy_header = traits.Bool( True, usedefault=True, desc= "copy headers of the original image into the output (corrected) file", )