An imaging capsule configured to be swallowed to scan the gastrointestinal tract of a person from the inside, including a radiation source providing X-Ray and gamma radiation for scanning the gastrointestinal tract, a pressure sensor for measuring the internal pressure in the imaging capsule and wherein the imaging capsule is configured to control the emission of radiation from within the imaging capsule responsive to the measurements of the pressure sensor.