X-rays generated by relativistic electrons in a waveguide radiator mounted inside a betatron