Select Page

Scrub Mask

The mask scrubbing tool removes small surface pits and bumps by examining voxel connectivity. With each iteration, it computes how many foreground voxels each foreground voxel has as a neighbor. If the threshold is not met, the foreground voxel becomes a background voxel. A similar process is applied to the background voxels. This stage should only take a few seconds.

Parameters

Foreground threshold
The minimum number of foreground voxels (voxels within the mask) a foreground voxel needs as neighbors to remain included in the masked volume. If it has fewer than this number of foreground neighbors, it is turned into a background voxel (i.e. it is no longer included in the masked volume).
Background threshold
The minimum number of background voxels (voxels outside of the mask) a background voxel needs as neighbors to remain excluded from the masked volume. If it has fewer than this number of background neighbors, it is turned into a foreground voxel (i.e. it included in the masked volume).

Command-Line Usage

scrubmask: filters binary masks to trim loosely connected voxels that may result from segmentation errors and produce bumps on tessellated surfaces.

usage: scrubmask -i input -o output [optional settings]

example: scrubmask -i input_mask.nii.gz -o output_mask.nii.gz -b 1

Required Settings:
Flags Description
-i <mask file> input structure mask file
-o <mask file> output structure mask file
Optional Settings:
Flags Description
-b <threshold> background fill threshold [default: 1]
-f <threshold> foreground trim threshold [default: 1]
-n <iterations> number of iterations [default: 10]
-v <level> verbosity (0=silent) [default: 1]
--timer timing function

Example Result

Output File

If “save output of each stage automatically” is checked on the Cortical Surface Extraction dialog, the following file is generated (where filename_prefix is the filename of the MRI scan without the file extension, e.g. “testsubj” for the file “testsubj.nii”):

Filename Contents
filename_prefix.cortex.scrubbed.mask.nii.gz Inner cortical boundary mask, with small pits and bumps removed

Restore from Previous Session

If BrainSuite was interrupted while performing this stage or to change the parameters for this stage and rerun after fully processing a scan, click “Restore From Previous…” on the bottom of this stage’s dialog box and load the original MRI scan. BrainSuite will automatically load all of the files generated in previous stages, allowing processing to restart from this intermediate stage.