Renders a slice from a plane of a segmentation as a data frame

seg_get_slice(segmentation, plane, slice, fill = FALSE)

Arguments

segmentation

a segmentation class object.

plane

character, name of the plane (one of `sagittal`, `coronal`, or `axial`)

slice

numeric or character, the slice number. If numeric, it will be used as index of the slice. If character, it will be the slice as named in the segmentation.

fill

logical, should the function return just the polygon vertices or all voxels? Default is FALSE.

Value

a `data.frame` containing the x y coordinates for all points within the slice (filled polygons)