This test uses a magnetic field, radiofrequency pulses, and a computer to produce detailed images of body structures in multiple planes. Some people may need an IV put in place so caregivers can inject a contrast solution into their veins. This depends on the exam the doctor has ordered. MRI is a more detailed tool than x-ray and ultrasound and for certain organs or areas of the body, it provides better images than CT.