Direct write electron-beam-to-x-ray converters are described, which may be programmed to focus x-rays into an arbitrary shape to provide spatial and intensity modulation to irradiate a malady such as a tumor. An integrated structure of the electron beam to x-ray converter comprises a collimating grid containing a target fluid. The collimating grid comprises a plurality of individual cells enclosed in a housing assembly. An electron beam aimed at a selected individual cell of the collimating grid may be converted to an x-ray beam within the target fluid.