The physician can either look directly in the scope or view the pictures on a TV monitor. This procedure allows the doctor to see more details than pictures taken with just X-rays. Through the endoscope, the physician can see the inside of the stomach and duodenum. Dye is injected using the endoscope into the ducts so that they can be seen on X-rays.