ENH: converter from triangular mesh to binary image