Scintillating microcavities for X-ray imaging sensors