assess#
Assess the quality and motion of each input stack. The output metrics can be used for determining the template stack or removing low-quality data
usage: nesvor assess --input-stacks str [str ...]
[--stack-masks str [str ...]] [--volume-mask str]
[--stacks-intersection] [--background-threshold float]
[--otsu-thresholding] [--output-json str] [--metric str]
[--filter-method str] [--cutoff float]
[--batch-size-assess int] [--no-augmentation-assess]
[--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-json
Type: str
Path to a json file for saving the inputs and results of the command.
stack assessment#
- --metric
Possible choices: ncc, matrix-rank, volume, iqa2d, iqa3d, none
Default: ncc
Metric for assessing input stacks.
ncc(↑): cross correlaiton between adjacent slices;matrix-rank(↓): motion metric based on the rank of the data matrix;volume(↑): volume of the masked ROI;iqa2d(↑): image quality score generated by a 2D CNN (only for fetal brain), the score of a stack is the average score of the images in it;iqa3d(↑): image quality score generated by a 3D CNN (only for fetal brain);none: no metric used for assessment.
Note: (↑) means a stack with a higher score will have a better rank.
- --filter-method
Possible choices: top, bottom, threshold, percentage, none
Default: none
Method to remove low-quality stacks.
top: keep the topCstacks;bottom: remove the bottomCstacks;threshold: remove a stack if the metric is worse thanC;percentatge: remove the bottom (num_stack * C) stacks;none: no filtering.
The value of
Cis specified by--cutoff.- --cutoff
Type: float
The cutoff value for filtering, i.e., the value
Cin--filter-method- --batch-size-assess
Type: int
Default: 8
Batch size for IQA network
- --no-augmentation-assess
Disable inference data augmentation in IQA network
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.