An x ray generator is provided comprising a plurality of electron field emitters (10) a target material (20) a plurality of energisable solenoid coils (40) and an electronic power and timing circuit. The generator is able to provide electrical current to at least one individual solenoid coil to create a magnetic field to cause the path (100) of electrons emitted from the emitter closest to the energised solenoid coil to be defocused and/or deflected before the electrons reach the target material and wherein the target material comprises a low atomic number material and a high atomic number material the high atomic number material being arranged in a regular pattern such that in use the electrons may be aimed at either the high or the low atomic number material.