An X-ray generator with adjustable collimation, comprising: an assembly of X-ray source, which includes an X-ray tube having a cathode and an anode and a front collimator; a high voltage generator, which is disposed in an extended chamber of a housing for the X-ray tube and which is used for supplying a direct current high voltage between the cathode and the anode of the X-ray tube to excite X-ray beams; a collimation adjustment unit, which is rotatably disposed outside of the front collimator and which is used for adjusting fan-type X-ray beams into continuous pencil-type X-ray beams; and wherein the X-ray generator further comprises a cooling unit, which is independently mounted to the X-ray tube and which is used for cooling the anode of the X-ray tube; wherein, the assembly of X-ray source, the high voltage generator, the collimation adjustment unit and the cooling unit are integrated as a whole; wherein, the assembly of X-ray source further comprises: a heat radiating base for the anode, which base is disposed at a side of the anode of the X-ray tube; wherein the heat radiating base has a heat-transfer surface for contacting with the cooling unit so as to be cooled; and an end cover and a tympan which is an element being squeezable from outside to inside under the action of atmospheric pressure, the end cover and the tympan being disposed at a side of the cathode of the X-ray tube and which co-operatively work to provide seal and leakage prevention; and characterized in that the cooling unit comprises a heat radiating plate and a heat tube being a fully enclosed vacuum tube acting as a heat conductor by transferring heat by means of evaporation and condensation of liquid, the heat tube being disposed on the heat radiating plate, and the heat radiating plate is configured to sufficiently contact with the heat-transfer surface of the heat radiating base via thermal conduction silicon grease. an assembly of X-ray source, which includes an X-ray tube having a cathode and an anode and a front collimator; a high voltage generator, which is disposed in an extended chamber of a housing for the X-ray tube and which is used for supplying a direct current high voltage between the cathode and the anode of the X-ray tube to excite X-ray beams; a collimation adjustment unit, which is rotatably disposed outside of the front collimator and which is used for adjusting fan-type X-ray beams into continuous pencil-type X-ray beams; and wherein the X-ray generator further comprises a cooling unit, which is independently mounted to the X-ray tube and which is used for cooling the anode of the X-ray tube; wherein, the assembly of X-ray source, the high voltage generator, the collimation adjustment unit and the cooling unit are integrated as a whole; wherein, the assembly of X-ray source further comprises: a heat radiating base for the anode, which base is disposed at a side of the anode of the X-ray tube; wherein the heat radiating base has a heat-transfer surface for contacting with the cooling unit so as to be cooled; and an end cover and a tympan which is an element being squeezable from outside to inside under the action of atmospheric pressure, the end cover and the tympan being disposed at a side of the cathode of the X-ray tube and which co-operatively work to provide seal and leakage prevention; and characterized in that the cooling unit comprises a heat radiating plate and a heat tube being a fully enclosed vacuum tube acting as a heat conductor by transferring heat by means of evaporation and condensation of liquid, the heat tube being disposed on the heat radiating plate, and the heat radiating plate is configured to sufficiently contact with the heat-transfer surface of the heat radiating base via thermal conduction silicon grease. a heat radiating base for the anode, which base is disposed at a side of the anode of the X-ray tube; wherein the heat radiating base has a heat-transfer surface for contacting with the cooling unit so as to be cooled; and an end cover and a tympan which is an element being squeezable from outside to inside under the action of atmospheric pressure, the end cover and the tympan being disposed at a side of the cathode of the X-ray tube and which co-operatively work to provide seal and leakage prevention; and characterized in that the cooling unit comprises a heat radiating plate and a heat tube being a fully enclosed vacuum tube acting as a heat conductor by transferring heat by means of evaporation and condensation of liquid, the heat tube being disposed on the heat radiating plate, and the heat radiating plate is configured to sufficiently contact with the heat-transfer surface of the heat radiating base via thermal conduction silicon grease.