Skip to content

Commit d15dc7a

Browse files
committed
fix: traits specifications for antsCT
1 parent 166f0f8 commit d15dc7a

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

nipype/interfaces/ants/segmentation.py

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ class antsCorticalThicknessInputSpec(ANTSCommandInputSpec):
319319
desc=('Prefix that is prepended to all output'
320320
' files (default = antsCT_)'))
321321
image_suffix=traits.Str('nii.gz', desc=('any of standard ITK formats,'
322-
' nii.gz is default'), mandatory = False, argstr='-s %s',
323-
usedefault=True)
322+
' nii.gz is default'), argstr='-s %s', usedefault=True)
324323
t1_registration_template = File(exists=True,
325324
desc = ('Anatomical *intensity* template'
326325
'(assumed to be skull-stripped). A common'
@@ -330,56 +329,54 @@ class antsCorticalThicknessInputSpec(ANTSCommandInputSpec):
330329
argstr='-t %s',
331330
mandatory=True)
332331
extraction_registration_mask=File(exists=True, argstr='-f %s',
333-
mandatory=False, desc='Mask (defined in the template'
334-
'space) used during registration for brain extraction.')
335-
keep_temporary_files=traits.Int(argstrr='-k %d',
336-
desc='Keep brain extraction/segmentation'
337-
'warps, etc (default = 0).', mandatory=False)
332+
desc=('Mask (defined in the template space) used during'
333+
' registration for brain extraction.'))
334+
keep_temporary_files=traits.Int(argstr='-k %d',
335+
desc='Keep brain extraction/segmentation warps, etc (default = 0).')
338336
max_iterations=traits.Int(argstr='-i %d',
339337
desc='ANTS registration max iterations'
340-
'(default = 100x100x70x20)', mandatory=False)
341-
prior_segmentation_weight=traits.Float(mandatory=False, argstr='-w %f',
338+
'(default = 100x100x70x20)')
339+
prior_segmentation_weight=traits.Float(argstr='-w %f',
342340
desc='Atropos spatial prior *probability* weight for'
343341
'the segmentation')
344-
segmentation_iterations=traits.Int(argstr='-n %d', mandatory=False,
342+
segmentation_iterations=traits.Int(argstr='-n %d',
345343
desc='N4 -> Atropos -> N4 iterations during segmentation'
346344
'(default = 3)')
347-
posterior_formulation=traits.Str(argstr='-b %s', mandatory=False,
345+
posterior_formulation=traits.Str(argstr='-b %s',
348346
desc=('Atropos posterior formulation and whether or not'
349347
'to use mixture model proportions.'
350348
'''e.g 'Socrates[1]' (default) or 'Aristotle[1]'.'''
351349
'Choose the latter if you'
352350
'want use the distance priors (see also the -l option'
353351
'for label propagation control).'))
354352
use_floatingpoint_precision=traits.Enum(0, 1, argstr='-j %d',
355-
mandatory=False,
356353
desc='Use floating point precision in registrations (default = 0)')
357-
use_random_seeding=traits.Enum(0, 1, argstr='-u %d', mandatory=False,
358-
desc='Use random number generated from system clock in Atropos'
359-
'(default = 1)')
360-
b_spline_smoothing=traits.Bool(argst='-v', mandatory=False,
361-
desc='Use B-spline SyN for registrations and B-spline'
362-
'exponential mapping in DiReCT.')
363-
cortical_label_image=File(exists=True, mandatory=False,
354+
use_random_seeding=traits.Enum(0, 1, argstr='-u %d',
355+
desc=('Use random number generated from system clock in Atropos'
356+
'(default = 1)'))
357+
b_spline_smoothing=traits.Bool(argstr='-v',
358+
desc=('Use B-spline SyN for registrations and B-spline'
359+
'exponential mapping in DiReCT.'))
360+
cortical_label_image=File(exists=True,
364361
desc='Cortical ROI labels to use as a prior for ATITH.')
365-
label_propagation=traits.Str(argstr='-l %s', mandatory=False,
366-
desc='Incorporate a distance prior one the posterior formulation. Should be'
362+
label_propagation=traits.Str(argstr='-l %s',
363+
desc=('Incorporate a distance prior one the posterior formulation. Should be'
367364
'''of the form 'label[lambda,boundaryProbability]' where label'''
368365
'is a value of 1,2,3,... denoting label ID. The label'
369366
'probability for anything outside the current label'
370367
' = boundaryProbability * exp( -lambda * distanceFromBoundary )'
371368
'Intuitively, smaller lambda values will increase the spatial capture'
372369
'range of the distance prior. To apply to all label values, simply omit'
373-
'specifying the label, i.e. -l [lambda,boundaryProbability].')
374-
quick_registration=traits.Bool(argstr='-q 1', mandatory=False,
375-
desc='If = 1, use antsRegistrationSyNQuick.sh as the basis for registration'
370+
'specifying the label, i.e. -l [lambda,boundaryProbability].'))
371+
quick_registration=traits.Bool(argstr='-q 1',
372+
desc=('If = 1, use antsRegistrationSyNQuick.sh as the basis for registration'
376373
'during brain extraction, brain segmentation, and'
377374
'(optional) normalization to a template.'
378-
'Otherwise use antsRegistrationSyN.sh (default = 0).')
379-
debug=traits.Bool(argstr='-z 1', mandatory=False,
380-
desc='If > 0, runs a faster version of the script.'
375+
'Otherwise use antsRegistrationSyN.sh (default = 0).'))
376+
debug=traits.Bool(argstr='-z 1',
377+
desc=('If > 0, runs a faster version of the script.'
381378
'Only for testing. Implies -u 0.'
382-
'Requires single thread computation for complete reproducibility.')
379+
'Requires single thread computation for complete reproducibility.'))
383380

384381
class antsCorticalThicknessoutputSpec(TraitedSpec):
385382
BrainExtractionMask=File(exists=True,

0 commit comments

Comments
 (0)