There are several different kinds of X-ray machines in a well-equipped hospital. These days the sensors are all electronic rather than using photographic negatives or X-ray film, and this allowed for the development of computer aided tomography (CT scan or "CAT scan") where many X-ray images are taken from many closely-spaced angles around a subject and a computer program calculates what 3D distribution of absorption would lead to all those images.
One of the reasons that these machines are so bulky is gravity, you have to suspend the patient and the rotating X-ray source and detector rigidly as they move against even tiny deflections due to gravity.
In a microgravity environment in spaceflight you would have the same rigidity requirement for the same resolution, but now as long as the subject could remain relatively motionless there are opportunities to make a much, much lighter structure that could simply spin the system around the patient, or better yet; spin the patient within the system since they're simply floating inside it!
A slowly spinning patient would provide some spin stabilization during the scan (similarly to the way spacecraft are stabilized), and some form of reference points (dots on critical areas of the subject or pattern recognition) to correct the tomography for small drifts are an opportunity for new technological developments in space medicine!
above: GE LightSpeed CT scanner at Open House, Monroeville, Pennsylvania source, below: Mobile X-ray machine]source