Function for translating the segmentations to a one-hot representation.

encodeUnet(segmentationsArray, segmentationLabels = NULL)

Arguments

segmentationsArray

an array of shape (batchSize, width, height, <depth>)

segmentationLabels

vector of segmentation labels. Note that a background label (typically 0) needs to be included.

Value

an n-D array of shape \( batchSize \times width \times height \times <depth> \times numberOfSegmentationLabels \)

Author

Tustison NJ