FastSurferCNN.reduce_to_aseg

FastSurferCNN.reduce_to_aseg.create_mask(aseg_data, dnum, enum)[source]

Create dilated mask.

Parameters:
aseg_datanpt.NDArray[int]

The input segmentation data.

dnumint

The number of iterations for the dilation operation.

enumint

The number of iterations for the erosion operation.

Returns:
  • Returns aseg_data.

FastSurferCNN.reduce_to_aseg.flip_wm_islands(aseg_data)[source]

Flip labels of disconnected white matter islands to the other hemisphere.

Parameters:
aseg_datanumpy.ndarray

The input segmentation data.

Returns:
flip_datanumpy.ndarray

The segmentation data with flipped WM labels.

FastSurferCNN.reduce_to_aseg.options_parse()[source]

Command line option parser.

Returns:
options

Object holding options.

FastSurferCNN.reduce_to_aseg.reduce_to_aseg(data_inseg)[source]

Reduce the input segmentation to a simpler segmentation.

Parameters:
data_insegnp.ndarray, torch.Tensor

The input segmentation. This should be a 3D array where the value at each position represents the segmentation label for that position.

Returns:
data_insegnp.ndarray, torch.Tensor

The reduced segmentation.