topology correction


In healthy subjects, assuming the cerebral cortex is closed off at the brainstem, the boundary of the cortex should be topologically equivalent to a sphere, i.e. it should have no holes or handles. However, because of segmentation errors, surfaces that are generated directly from the binary object produced by the previous step are likely to contain topological holes or handles. These can lead to subsequent problems in producing flat-maps or making 1-1 surface correspondences across subjects. Thus, a graph-based algorithm is applied to force the segmented group of voxels to have spherical topology (Shattuck and Leahy, 2001).


Minimum correction size
The starting size, in voxels, for the topological corrections
Maximum correction size
The largest size, in voxels, allowed for a topological correction

Fill offset
Specifies an offset to determine preference between hole filling and handle cutting (i.e. between connecting and disconnecting components)

Command-Line Usage

tca: topological correction algorithm that removes topological handles from a binary object. Algorithm created by David W Shattuck and Richard M Leahy

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

example: tca -i input_mask.nii.gz -o output_mask.nii.gz -m 200 -n 1

Required Settings:
Flags Description
-i <input filename> input mask volume
-o <output filename> output mask volume
Optional Settings:
Flags Description
-m <n> maximum correction size [default: 200]
-n <n> minimum correction size [default: 1]
--delta <delta> foreground delta [default: 0]
-v <level> verbosity (0 = quiet) [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 files are 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.tca.mask.nii.gz Scrubbed inner cortical boundary mask with topological corrections

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.