1. A high voltage generator, comprising:an inverter bridge including a first bridge leg and a second bridge leg, the first bridge leg or the second bridge leg including at least two switch transistors distributed in series;
a first resonant branch coupled in series to the first bridge leg;
a transformer coupled in series between the first resonant branch and the second bridge leg;
a second resonant branch coupled in parallel with the transformer, whereinthe second resonant branch includes a capacitor and an inductor,
a first end of the capacitor is connected to a first end of the inductor,
a second end of the capacitor is connected to a first end of the transformer, and
a second end of the inductor is connected to a second end of the transformer; and
a rectifier circuit coupled with the transformer for providing an output voltage to an X-ray source.