to_mask#

contours_to_mask(contours, shape_zyx, ...[, ...])

Convert contours to a mask on the given image grid.

mesh_to_mask(poly, shape_zyx, origin, ...[, ...])

Rasterize a closed mesh by cutting it at the CT slice centres.