Micro-optical elements and their integration to glass and optoelectronic wafers