correct-bias-field#
Perform bias field correction for each input stack with the N4 algorithm.
usage: nesvor correct-bias-field --input-stacks str [str ...]
[--stack-masks str [str ...]]
[--volume-mask str] [--stacks-intersection]
[--background-threshold float]
[--otsu-thresholding]
--output-corrected-stacks str [str ...]
[--output-json str] [--n-proc-n4 int]
[--shrink-factor-n4 int] [--tol-n4 float]
[--spline-order-n4 int] [--noise-n4 float]
[--n-iter-n4 int] [--n-levels-n4 int]
[--n-control-points-n4 int] [--n-bins-n4 int]
[--device int] [--verbose int]
[--output-log str] [--seed int] [--debug]
inputs#
- --input-stacks
Type: str [str ...]
Paths to the input stacks (NIfTI).
input stacks masking#
- --stack-masks
Type: str [str ...]
Paths to masks of input stacks.
- --volume-mask
Type: str
Paths to a 3D mask which will be applied to each input stack.
- --stacks-intersection
Only consider the region defined by the intersection of input stacks. Will be ignored if
--volume-maskis provided.- --background-threshold
Type: float
Default: 0
pixels with value <= this threshold will be ignored.
- --otsu-thresholding
Apply Otsu thresholding to each input stack.
outputs#
- --output-corrected-stacks
Type: str [str ...]
Path to the output folder or list of pathes to the output corrected stacks
- --output-json
Type: str
Path to a json file for saving the inputs and results of the command.
N4 bias field correction#
- --n-proc-n4
Type: int
Default: 8
number of workers for the N4 algorithm.
- --shrink-factor-n4
Type: int
Default: 2
The shrink factor used to reduce the size and complexity of the image.
- --tol-n4
Type: float
Default: 0.001
The convergence threshold in N4.
- --spline-order-n4
Type: int
Default: 3
The order of B-spline.
- --noise-n4
Type: float
Default: 0.01
The noise estimate defining the Wiener filter.
- --n-iter-n4
Type: int
Default: 50
The maximum number of iterations specified at each fitting level.
- --n-levels-n4
Type: int
Default: 4
The maximum number of iterations specified at each fitting level.
- --n-control-points-n4
Type: int
Default: 4
The control point grid size in each dimension. The B-spline mesh size is equal to the number of control points in that dimension minus the spline order.
- --n-bins-n4
Type: int
Default: 200
The number of bins in the log input intensity histogram.
miscellaneous#
- --device
Type: int
Default: 0
Id of the device to use. Use GPU if it is nonnegative and use CPU if it is negative.
- --verbose
Possible choices: 0, 1, 2
Default: 1
Level of verbosity: (0: warning/error, 1: info, 2: debug)
- --output-log
Type: str
Path to the output log file
- --seed
Type: int
Random seed
- --debug
Debug mode.