is a binary mask (multidimensional array of logical values).
Value
A vector of values the same length as the input array.
Details
This method most likely only works with convex three-dimensional
shapes (e.g., a hyper-rectangle). Further testing is required to
know the limits of the current implementation.