def export_ply(filename, cutout, level=<NUM_LIT:0>):
if "<STR_LIT>" not in filename:<EOL><INDENT>filename = filename + "<STR_LIT>"<EOL><DEDENT>vs, fs = mcubes.marching_cubes(cutout, level)<EOL>with open(filename, '<STR_LIT:w>') as fh:<EOL><INDENT>lines = [<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>" + str(len(vs)),<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>" + str(len(fs)),<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"<EOL>]<EOL>fh.writelines(lines)<EOL>for v in vs:<EOL><INDENT>fh.write("<STR_LIT>".format(v[<NUM_LIT:0>], v[<NUM_LIT:1>], v[<NUM_LIT:2>]))<EOL><DEDENT>for f in fs:<EOL><INDENT>fh.write("<STR_LIT>".format(f[<NUM_LIT:0>], f[<NUM_LIT:1>], f[<NUM_LIT:2>]))<EOL><DEDENT><DEDENT>
Converts a dense annotation to a .PLY, using Marching Cubes (PyMCubes).

Arguments:
    filename (str): The filename to write out to
    cutout (numpy.ndarray): The dense annotation
    level (int): The level at which to run mcubes

Returns:
    boolean success