def marching_cubes_to_obj(marching_cubes_out, output_file):
    """
    Saves the output of skimage.measure.marching_cubes as an .obj file

    :param marching_cubes_out: tuple
    :param output_file: str

    """
    verts, faces, normals, _ = marching_cubes_out
    with open(output_file, 'w') as f:
        for item in verts:
            f.write(f'v {item[0]} {item[1]} {item[2]}\n')
        for item in normals:
            f.write(f'vn {item[0]} {item[1]} {item[2]}\n')
        for item in faces:
            f.write(
                f'f {item[0]}//{item[0]} {item[1]}//{item[1]} {item[2]}//{item[2]}\n'
                )
        f.close()
