@@ -317,6 +317,16 @@ class N4BiasFieldCorrectionInputSpec(ANTSCommandInputSpec):
317
317
The result is that the range can "drift" from the original at each iteration.
318
318
This option rescales to the [min,max] range of the original image intensities
319
319
within the user-specified mask.""" )
320
+ histogram_sharpening = traits .Tuple (
321
+ (0.15 , 0.01 , 200 ),
322
+ traits .Float , traits .Float , traits .Int ,
323
+ argstr = '--histogram-sharpening [%g,%g,%d]' ,
324
+ desc = """\
325
+ Three-values tuple of histogram sharpening parameters \
326
+ (FWHM, wienerNose, numberOfHistogramBins).
327
+ These options describe the histogram sharpening parameters, i.e. the \
328
+ deconvolution step parameters described in the original N3 algorithm.
329
+ The default values have been shown to work fairly well.""" )
320
330
321
331
322
332
class N4BiasFieldCorrectionOutputSpec (TraitedSpec ):
@@ -381,6 +391,15 @@ class N4BiasFieldCorrection(ANTSCommand):
381
391
>>> n4_4.cmdline
382
392
'N4BiasFieldCorrection -d 3 --input-image structural.nii \
383
393
--output [ structural_corrected.nii, structural_bias.nii ]'
394
+
395
+ >>> n4_5 = N4BiasFieldCorrection()
396
+ >>> n4_5.inputs.input_image = 'structural.nii'
397
+ >>> n4_5.inputs.dimension = 3
398
+ >>> n4_5.inputs.histogram_sharpening = (0.12, 0.02, 200)
399
+ >>> n4_5.cmdline
400
+ 'N4BiasFieldCorrection -d 3 --histogram-sharpening [0.12,0.02,200] \
401
+ --input-image structural.nii --output structural_corrected.nii'
402
+
384
403
"""
385
404
386
405
_cmd = 'N4BiasFieldCorrection'
0 commit comments