HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
X-Ray Imaging, CT and MRI
  1. 1Making X-rays: the tube and its spectrum
  2. 2Attenuation, contrast and the X-ray image
  3. 3Computed tomography and MRI in outline
  1. Physics
  2. /X-Ray Imaging, CT and MRI
  3. /Attenuation, contrast and the X-ray image

Course 30.2·Lesson 2 of 3

Attenuation, contrast and the X-ray image

A beam of X-rays falls off as I=I0e−μxI = I_0e^{-\mu x}I=I0​e−μx

Lesson 2 of 3Show all lessonsHide
X-Ray Imaging, CT and MRI
  1. 1Making X-rays: the tube and its spectrum
  2. 2Attenuation, contrast and the X-ray image
  3. 3Computed tomography and MRI in outline

Try the code and the simulations beside the lesson.

A shadow made of numbers

An X-ray picture is a shadow. Where the beam is absorbed, the detector gets little and the picture is white. Where the beam passes, the picture is dark. Bone looks white and the lungs look dark. To understand the picture we need to know how a beam is absorbed.

The exponential law

Each thin layer of a material removes the same fraction of the photons that reach it. That gives an exponential fall with the thickness xxx:

I=I0e−μx\displaystyle I = I_0e^{-\mu x}I=I0​e−μx

Here μ\muμ is the linear attenuation coefficient, often in cm−1\text{cm}^{-1}cm−1. It depends on the material and on the photon energy. The thickness that halves the intensity is the half-value thickness. From e−μx1/2=12e^{-\mu x_{1/2}} = \tfrac{1}{2}e−μx1/2​=21​,

x1/2=ln⁡2μ\displaystyle x_{1/2} = \frac{\ln 2}{\mu}x1/2​=μln2​

Some books also use the mass attenuation coefficient μm=μ/ρ\mu_m = \mu/\rhoμm​=μ/ρ, in cm2/g\text{cm}^2/\text{g}cm2/g. It compares materials of different density fairly.

Worked example: bone in an arm

Take μ=0.20 cm−1\mu = 0.20\ \text{cm}^{-1}μ=0.20 cm−1 for soft tissue and μ=0.62 cm−1\mu = 0.62\ \text{cm}^{-1}μ=0.62 cm−1 for bone, at the energy of a typical beam. One path crosses 8.08.08.0 cm of tissue. A second path crosses 6.06.06.0 cm of tissue and 2.02.02.0 cm of bone.

  1. Tissue only. μx=0.20 cm−1×8.0 cm=1.6\mu x = 0.20\ \text{cm}^{-1} \times 8.0\ \text{cm} = 1.6μx=0.20 cm−1×8.0 cm=1.6. So I/I0=e−1.6=0.202I/I_0 = e^{-1.6} = 0.202I/I0​=e−1.6=0.202.
  2. With bone. The exponents add: 0.20 cm−1×6.0 cm+0.62 cm−1×2.0 cm=2.440.20\ \text{cm}^{-1} \times 6.0\ \text{cm} + 0.62\ \text{cm}^{-1} \times 2.0\ \text{cm} = 2.440.20 cm−1×6.0 cm+0.62 cm−1×2.0 cm=2.44. So I/I0=e−2.44=0.087I/I_0 = e^{-2.44} = 0.087I/I0​=e−2.44=0.087.
  3. The contrast. The detector behind the tissue gets 0.2020.087=2.3\dfrac{0.202}{0.087} = 2.30.0870.202​=2.3 times as much. The bone shows up clearly.

How tissue absorbs X-rays

Three processes remove photons from the beam.

  • The photoelectric effect. The photon gives all its energy to an inner electron of an atom, and the photon is gone. It is strongest at low energy and for a high atomic number ZZZ. Roughly, it grows as Z3Z^3Z3 and falls as 1/E31/E^31/E3. Bone holds calcium, so its ZZZ is higher than that of soft tissue. This is the main source of contrast.
  • Compton scattering. The photon bounces off a loosely held electron and goes on in a new direction with less energy. It depends mainly on the number of electrons, so it changes little from tissue to bone. It is the main process from about 303030 keV upwards in soft tissue. Scattered photons fog the picture.
  • Pair production. A photon of more than 1.0221.0221.022 MeV can turn into an electron and a positron near a nucleus. Diagnostic X-rays never have so much energy, but radiotherapy beams do.

So a lower voltage gives more contrast, because more photons are taken out by the photoelectric effect. It also gives the patient a larger dose. A radiographer balances the two.

Making soft organs show up

The stomach and the blood vessels have almost the same μ\muμ as the tissue around them. A contrast medium with a high ZZZ fixes this. A patient swallows a barium meal (Z=56Z = 56Z=56) to show the gut. A compound of iodine (Z=53Z = 53Z=53) injected into the blood shows the vessels, in an angiogram.

A sharp picture

A picture can have good contrast and still be blurred.

  • A small focal spot on the anode gives sharp edges to the shadows.
  • A grid of thin lead strips in front of the detector stops most scattered photons.
  • A short exposure stops the patient moving during the picture.

Today the detector is usually a digital flat panel. Older films used a screen that glows when X-rays hit it, to cut the dose.

Set the thickness to 222 cm. How many times more of the beam gets through tissue than bone? Now lower both coefficients, as a higher voltage does. Does the contrast grow or shrink?

Practise with new numbers

Try it in Python

The program finds the share of the beam along two paths through an arm, and the half-value thickness of each material.

Predict first. Will the half-value thickness of bone be more or less than half that of tissue? Then run it. Check with Show the answer.

1. A higher voltage lowers the coefficients to 0.17 and 0.35. Change them. What is the ratio now?

2. Put the bone at 3.0 cm and the tissue at 5.0 cm on the second path. What is the ratio?

Common mistakes

  • Treating attenuation as a straight-line fall. Each layer removes a fraction of what is left, so the fall is exponential.
  • Using the half-value thickness as 1/μ1/\mu1/μ. It is ln⁡2/μ\ln 2/\muln2/μ.
  • Saying bone is white because it reflects X-rays. It absorbs them. Less reaches the detector behind it.
  • Thinking Compton scattering gives contrast. It depends mainly on the number of electrons and mostly fogs the picture.

Remember these

  • I=I0e−μxI = I_0e^{-\mu x}I=I0​e−μx and x1/2=ln⁡2/μx_{1/2} = \ln 2/\mux1/2​=ln2/μ. Layers add in the exponent.
  • Photoelectric effect: about Z3/E3Z^3/E^3Z3/E3, the main source of contrast.
  • Compton scattering: little contrast, causes fog. Pair production: above 1.0221.0221.022 MeV.
  • Lower voltage: more contrast, more dose.
  • Barium and iodine are contrast media. A small focal spot and a grid give sharpness.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. A material has μ=0.35 cm−1\mu = 0.35\ \text{cm}^{-1}μ=0.35 cm−1. What is its half-value thickness?
  1. How many half-value thicknesses cut a beam to 1/81/81/8 of its intensity?
  1. Why does barium show the gut on an X-ray, while the gut alone does not?
  1. Why does a grid in front of the detector make a sharper picture?

References

  • OpenStax College Physics 2e, Chapter 32 Medical Applications of Nuclear Physics, and Chapter 30 Atomic Physics, on X-rays.
  • Cambridge International AS and A Level Physics (9702) syllabus, Medical physics, attenuation of X-rays and contrast.

Enroll free in X-Ray Imaging, CT and MRI

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (4)

A beam holds soft photons of 20 keV and harder ones of 60 keV…Hard · High School (11–12) · by StemPy Lab
A beam crosses a finger 2.0 cm thick. One line passes through soft tissue only…Hard · High School (11–12) · by StemPy Lab
At the energies of a diagnostic beam, absorption by the photoelectric effect, for each atom of the…Advanced · High School (11–12) · by StemPy Lab
Next: lesson 3Computed tomography and MRI in outline
← X-Ray Imaging, CT and MRI
← Making X-rays: the tube and its spectrumComputed tomography and MRI in outline →

Discussion (0)

Log in to join the discussion.

Loading…

, so a half-value thickness
x1/2=ln⁡2/μx_{1/2} = \ln 2/\mux1/2​=ln2/μ
halves it. Bone absorbs far more than soft tissue, mainly by the photoelectric effect, and that difference is the contrast of the picture. Barium and iodine make soft parts show up.
about 30 min1 simulation2 practice questions1 Python program5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

A radiographer wears an apron with a layer of lead 0.50 mm thick…Hard · High School (11–12) · by StemPy Lab

Python Labs (1)

Attenuation in codePython Lab · by StemPy Lab