I need to go from a collection of closed polygons each associate with a slice of an image volume, to an image volume defining a mask. In other words, for each slice in a volume, I want to set pixels to 1 if they're inside a polygon in the collection, and set them to zero if they're not. Suggestions?