Hospitals do often have such machines. There are some forms of surgeries where these are used by the surgeon to “see” inside the body as they are operating. The problem is that X-rays are ionizing radiation which causes harm to your body. So you do not want to have an X-ray machine turned on for long unless it is absolutely required.
Latest Answers