9595 @pyramid [NAME] ...
9696
9797@loss options:
98- FACTOR must be a scalar value [1]
9998 NAME can take values (with specific sub-options):
10099 [mi, nmi] Mutual information (can be normalized)
101100 -m, --norm NAME Normalization: [studholme], arithmetic, geometric, no
126125 cat, cce Categorical cross-entropy
127126 dice, f1 Dice coefficient
128127 -w, --weight *VAL Weight per class [1]
128+ FACTOR must be a scalar value [1]
129129 Common options:
130130 -s, --symmetric Make loss symmetric [False]
131131 -z, --slicewise [AXIS=-1] Make loss slice-wise [False]
153153 -c, --channels *C Channels to load. Can be a range start:stop:step [:]
154154
155155@affine options:
156- FACTOR must be a scalar value [1] and is a global penalty factor
157156 NAME can take values:
158157 t, translation Translations only
159158 o, rotation Rotations only
160159 [r, rigid] Translations + Rotations
161160 s, similitude Translations + Rotations + Iso zoom
162161 a, affine Full affine
162+ FACTOR must be a scalar value [1] and is a global penalty factor
163163 Common options:
164164 -p, --position Position of the affine: [sym], mov, fix
165165 -g, --progressive Progressive optimization (t -> r -> s -> a) [false]
168168 -2d [AXIS=2] Force transform to be 2d about AXIS
169169
170170@nonlin options:
171- FACTOR must be a scalar value [1] and is a global penalty factor
172171 NAME can take values:
173172 [v, svf] Stationary velocity field
174173 g, shoot Geodesic shooting
175174 d, smalldef Dense deformation field
175+ FACTOR must be a scalar value [1] and is a global penalty factor
176176 Common options:
177177 -i, --input Path to initial transform
178178 -o, --output Path to the output transform: [{dir}/{name}.nii.gz]
@@ -336,7 +336,7 @@ def _convert(x):
336336 help = 'Name of the image loss' )
337337loss = cli .NamedGroup ('loss' , loss_choices , '@loss' , n = '+' ,
338338 help = 'A loss between two images' )
339- loss .add_positional ('factor' , nargs = '? ' , default = 1. , convert = float ,
339+ loss .add_positional ('factor' , nargs = '* ' , default = [ 1. ] , convert = float ,
340340 help = 'Weight it this component in the global loss' )
341341loss .add_option ('symmetric' , ('-s' , '--symmetric' ), nargs = 0 , default = False ,
342342 help = 'Make the loss symmetric' )
@@ -529,7 +529,7 @@ def _convert(x):
529529 convert = lambda x : affine_aliases .get (x , x ),
530530 help = 'Name of the affine transform' )
531531affine = cli .NamedGroup ('affine' , affine_choices , '@affine' , n = '?' , make_default = False )
532- affine .add_positional ('factor' , nargs = '? ' , default = 1. , convert = float ,
532+ affine .add_positional ('factor' , nargs = '* ' , default = [ 1. ] , convert = float ,
533533 help = 'Penalty factor' )
534534affine .add_option ('position' , ('-p' , '--position' ), default = 'sym' , nargs = 1 ,
535535 validation = cli .Validations .choice (['sym' , 'mov' , 'fix' ]),
@@ -556,7 +556,7 @@ def _convert(x):
556556 convert = lambda x : nonlin_aliases .get (x , x ),
557557 help = 'Name of the nonlinear transform' )
558558nonlin = cli .NamedGroup ('nonlin' , nonlin_choices , '@nonlin' , n = '?' , make_default = False )
559- nonlin .add_positional ('factor' , nargs = '? ' , default = 1. , convert = float ,
559+ nonlin .add_positional ('factor' , nargs = '* ' , default = [ 1. ] , convert = float ,
560560 help = 'Penalty factor' )
561561nonlin .add_option ('steps' , ('-s' , '--steps' ), nargs = 1 , default = 8 , convert = int ,
562562 help = 'Number of integration steps' )
0 commit comments