Intracavity image upconversion system with fast and flexible electro-optic image gating based on