Difference between revisions of "CT x-ray scanner"

From Noah.org
Jump to: navigation, search
m (Typical Dose)
m (Linux Ubuntu Packages)
 
(40 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
[[Category:Free_Software]]
 
[[Category:Free_Software]]
 
[[Category:Python]]
 
[[Category:Python]]
 +
[[Category:x-rays]]
 +
 +
See also:
 +
 +
*[[digital fluoroscope]]
 +
*[[instant film x-rays]]
 +
*[[:Category:x-rays]]
 +
*[[stepper motor control]]
 +
 
== CT scanner (x-ray CAT scan) ==
 
== CT scanner (x-ray CAT scan) ==
  
Line 8: Line 17:
  
 
If this sounds confusing then imagine you are outside a picket fence that surrounds the house. You can't take a good photo of the house with all the picket slats blocking the view, but if you were looking at the house while sitting in a car driving past the house then the picket slats would blur together and the fence would appear to disappear. To take advantage of this effect with your camera you can't use a fast exposure because that would freeze the slats as if you were not moving. You need a long exposure to blur the fence away, but this would also blur the house; however, if you pivot the camera to track the house while you make the exposure then the wooden slats would still stay blurred, but the house would appear still. A similar trick is used to photograph a race car as it speeds by. Using a high-speed shutter will freeze everything as if there were no motion and you end up with a boring picture of a car sitting in the road with a bunch of people staring at it. But if take the shot with a slow shutter while you track the car speeding past you then the road and the spectators will be a speeding blur, but the car will be in focus.
 
If this sounds confusing then imagine you are outside a picket fence that surrounds the house. You can't take a good photo of the house with all the picket slats blocking the view, but if you were looking at the house while sitting in a car driving past the house then the picket slats would blur together and the fence would appear to disappear. To take advantage of this effect with your camera you can't use a fast exposure because that would freeze the slats as if you were not moving. You need a long exposure to blur the fence away, but this would also blur the house; however, if you pivot the camera to track the house while you make the exposure then the wooden slats would still stay blurred, but the house would appear still. A similar trick is used to photograph a race car as it speeds by. Using a high-speed shutter will freeze everything as if there were no motion and you end up with a boring picture of a car sitting in the road with a bunch of people staring at it. But if take the shot with a slow shutter while you track the car speeding past you then the road and the spectators will be a speeding blur, but the car will be in focus.
 +
 +
''Synthetic Aperture Photography'' or ''Synthetic Aperture Imaging'' seems to be closely related, if not completely analogous to tomography. Slices of the images used in building a synthetic film plane look exactly like a Radon transform.
  
 
Back to x-rays...
 
Back to x-rays...
Line 70: Line 81:
  
 
'''radiographic density''' refers to the number of x-ray photons emitted by the x-ray emitter that make it to the detector. This is mostly controlled by the current supplied to the x-ray tube. The higher the current the more photons you get (higher radiographic density). The photons are not weaker or stronger. In general, raising current will emit '''more''' x-ray photons with the same spectrum and '''peak kilovoltage''' energy level. The '''peak kilovoltage''' also contributes a smaller portion to the '''radiographic density'''. High energy x-ray photons produce more scattering. These scattered photons may actually hit the detector and so increase the '''radiographic density'''. The downside is that if you are trying to form an image these photons only add useless noise because they were scattered from their original direction.
 
'''radiographic density''' refers to the number of x-ray photons emitted by the x-ray emitter that make it to the detector. This is mostly controlled by the current supplied to the x-ray tube. The higher the current the more photons you get (higher radiographic density). The photons are not weaker or stronger. In general, raising current will emit '''more''' x-ray photons with the same spectrum and '''peak kilovoltage''' energy level. The '''peak kilovoltage''' also contributes a smaller portion to the '''radiographic density'''. High energy x-ray photons produce more scattering. These scattered photons may actually hit the detector and so increase the '''radiographic density'''. The downside is that if you are trying to form an image these photons only add useless noise because they were scattered from their original direction.
 +
 +
== Enhancing image contrast ==
 +
 +
Scatter hurts image contrast. Scatter can be limited using beam apertures.
 +
 +
=== Controlling the beam before it reaches the target ===
 +
 +
Before the target a '''slit''' aperture should be used to force the beam from a '''cone''' into a '''fan'''. Additional tube or silhouette apertures may be added to reduce scatter from x-rays bouncing off equipment outside the target area.
 +
 +
=== Controlling the beam after the target, before it reaches the sensor ===
 +
 +
The target will both attenuate and scatter the beam. Only the attenuated beam is useful. The scatter photons only contribute noise (haze). These can be reduce by using a '''grid''' before the sensor. The sides of the grid will trap scatter photons because these photons are at a different angle from the main beam. Grids are often made of thin sheets of lead interspersed with support layers made of aluminum or plastic that are transparent to x-rays. The lead acts as the grid walls. The interspersed layers are just for support.
  
 
== x-ray vs. gamma ==
 
== x-ray vs. gamma ==
  
 
X-rays and gamma rays are basically the same thing -- photons. The distinctions between when to use one term versus another is not standardized. Often the term '''gamma ray''' refers to photons that come from the atomic nucleus (nuclear decay, annihilation, fusion, etc.), and the term '''x-ray''' refers to photons that come from interactions with electrons. Generally, gamma photons are higher energy than x-ray photons, but this is not a rule. Some radioactive isotopes emit gamma photons when they decay that have lower energy than small, diagnostic x-ray machines. There are linear accelerators that emit megavolt photons using a process essentially no different than a small, diagnostic x-ray machines.
 
X-rays and gamma rays are basically the same thing -- photons. The distinctions between when to use one term versus another is not standardized. Often the term '''gamma ray''' refers to photons that come from the atomic nucleus (nuclear decay, annihilation, fusion, etc.), and the term '''x-ray''' refers to photons that come from interactions with electrons. Generally, gamma photons are higher energy than x-ray photons, but this is not a rule. Some radioactive isotopes emit gamma photons when they decay that have lower energy than small, diagnostic x-ray machines. There are linear accelerators that emit megavolt photons using a process essentially no different than a small, diagnostic x-ray machines.
 +
 +
=== Energy, frequency, Electron volts ===
 +
 +
The amount of energy a photon carries is determined by its frequency (v) or wavelength (λ).
 +
 +
<pre>
 +
E = h * v
 +
  or
 +
E = h * c / λ
 +
  or
 +
E eV = 1240 eV nm / λ nm
 +
</pre>
 +
 +
Where Planck's Constant, '''h = 4.135667516(91)×10−15 eV·s''', and the Speed of Light, '''c = 299792458 m/s'''.
 +
 +
So an 80 keV x-ray beam emits photons with a peak energy of 80 keV, this the wavelength:
 +
<pre>
 +
  80 keV = 1240 eV nm / λ
 +
  λ = 1240 eV nm / 80 keV = 1240 eV nm / 80000 eV
 +
  λ = 0.0155 nm
 +
</pre>
  
 
== scintillator phosphor ==
 
== scintillator phosphor ==
Line 101: Line 145:
 
*Absorption: K-edge @ 50.22 keV
 
*Absorption: K-edge @ 50.22 keV
 
*Effective atomic #: 59.5
 
*Effective atomic #: 59.5
*Vendor Brands: 3M Trimax 12, Agfa Curix Ortho Regular, Agfa Curix Ortho Fast, Fuji HR Fast, Kodak Lanex Fast, Kodak Min-R 2190 screen (used for mammography; high-contrast, low dose), MCI Optonix Green 600, Soyee Green Ultra (800 speed) (also known as KG-8 Green), Soyee Green Special (400 speed)
+
*Vendor Brands: 3M Trimax 12, Agfa Curix Ortho Regular -- ''This is a good one'', Agfa Curix Ortho Fast, Fuji HR Fast, Kodak Lanex Fast, Kodak Min-R 2190 screen (used for mammography; high-contrast, low dose), MCI Optonix Green 600, '''Soyee Green Ultra (800 speed) (also known as KG-8 Green)''' -- ''This is my current preference'', Soyee Green Special (400 speed)
  
 
=== Yttrium silicate ===
 
=== Yttrium silicate ===
Line 135: Line 179:
 
=== Ritter x-ray heads ===
 
=== Ritter x-ray heads ===
  
I have some experience working with Ritter units. They are typically rated at 70 to 80 kV. They are a bit heavy, but they are built like a tank. They have very little head leakage.
+
See also [[Ritter_x-ray]]
 +
 
 +
I have some experience working with Ritter units. They are typically rated at 70 to 80 kV. They are a bit heavy, but they are built like a tank. They have very little radiation leakage from the head.
  
 
The J-series heads are filled with '''[http://en.wikipedia.org/wiki/Sulfur_hexafluoride Sulfur hexafluoride]''' dielectric gas. Generally you never need to open the heads, but it is impossible to open and service the heads without letting this gas escape. The head will almost certainly not function without the dielectric gas. It may be possible to drill and tap two holes in the head for fill and drain holes. These could then be used to refill the head with a dielectric oil, or even refill with '''Sulfur hexaflouride'''. The heads are filled at the factory without any gas fittings, so attempting to refill them in a small shop would be difficult without modifying the head with gas fittings. Oil would be easier if one is going through the trouble of adding fittings. Of course, oil is messy.
 
The J-series heads are filled with '''[http://en.wikipedia.org/wiki/Sulfur_hexafluoride Sulfur hexafluoride]''' dielectric gas. Generally you never need to open the heads, but it is impossible to open and service the heads without letting this gas escape. The head will almost certainly not function without the dielectric gas. It may be possible to drill and tap two holes in the head for fill and drain holes. These could then be used to refill the head with a dielectric oil, or even refill with '''Sulfur hexaflouride'''. The heads are filled at the factory without any gas fittings, so attempting to refill them in a small shop would be difficult without modifying the head with gas fittings. Oil would be easier if one is going through the trouble of adding fittings. Of course, oil is messy.
Line 156: Line 202:
  
 
The conventional units for the Sievert time derivative is '''mSv/h''' (millisievert per hour).  
 
The conventional units for the Sievert time derivative is '''mSv/h''' (millisievert per hour).  
 +
 +
== Safety ==
 +
 +
When working with radiation in any form your first investment in equipment should be radiation detection. You also need an understanding of what you are measuring. You wouldn't stick your finger into an electrical socket without first testing with a volt meter, so neither should you energize a tube without some means of measurement.
 +
 +
A Geiger counter can make an excellent measurement device. The values they give can be difficult to use and interpret without training. Geiger counters actually make a very interesting topic of their own. One problem with a Geiger counter is that they can miss extremely short pulses of radiation. Some types of x-ray sources emit a stream of pulses 20 to 60 nanoseconds long. The total radiation dose may be quite high, but the Geiger counter simply doesn't see pulses so short.
 +
 +
A dosimeter is a useful tool. Dosimeters are designed specifically for human safety, so they tend to be easy to use and understand. They also use '''integrating''' detectors such as ionization chambers, quartz fiber dosimeters, and film dosimeters. These will detect even very short pulses of x-ray radiation, but they don't always give instant readings. They are most often used to measure cumulative radiation exposure (dose). I use a dosimeter from [http://www.instadose.com/], which requires a yearly subscription fee for processing.
 +
 +
Some people have told me they heard that small amounts of radiation may acually be good for you (a theory known as '''hormesis'''). This is an interesting subject; however, I don't base my safety on an unsubstantiated theory that I know little about. The most prudent path to follow is to ensure zero exposure.
  
 
=== Acute Radiation Doses ===
 
=== Acute Radiation Doses ===
 +
 +
The Sievert (SEE-vert) scale is not much more than a magnification of the '''rem''' scale. Both are intended to measure radiation from the point of view of ''damage'' rather than just measuring quantity. All the Sievert scale does is more the decimal point two places to the right. One reason you might prefer the Sievert scale to the rem scale is because whole numbers in the Sievert scale nicely fit into an easy to remember 1-10 scale of danger; although, note that even '''1''' Sievert will make you very sick.
 +
 +
;1 Sievert: not dead (but sick)
 +
;5 Sievert: 50% dead
 +
;10 Sievert: 100% dead
 +
 +
Here is the scale broken down into more detail:
  
 
0 -- 250 mSv: No symptoms of injury are felt. No signs of injury.
 
0 -- 250 mSv: No symptoms of injury are felt. No signs of injury.
Line 165: Line 229:
 
1000 -- 3000 mSv (3 Sieverts): Nausea, loss of appetite. Possible risk of infection; severe bone marrow, lymph node, and spleen damage. Most, but not all, recover from injuries.
 
1000 -- 3000 mSv (3 Sieverts): Nausea, loss of appetite. Possible risk of infection; severe bone marrow, lymph node, and spleen damage. Most, but not all, recover from injuries.
  
3000 -- 6000 mSv (6 Sieverts): Nausea, loss of appetite. Hemorrhaging, infection, diarrhea, skin peeling. Death without hospitalization. '''Note:''' LD50 after 30 days is 5000 mSv. That is, you have a 50% chance of death within a month if exposed to 5000 mSv.
+
3000 -- 6000 mSv (6 Sieverts): Nausea, loss of appetite. Hemorrhaging, infection, diarrhea, skin peeling. Death without hospitalization. '''Note:''' LD50 after 30 days is 5000 mSv (5 Sv). That is, you have a 50% chance of death within a month if exposed to 5000 mSv (5 Sv).
  
 
6000 -- 10000 mSv (10 Sieverts): Nausea, loss of appetite. Hemorrhaging, infection, diarrhea, skin peeling, central nervous system impairment. Death is likely even with hospitalization.
 
6000 -- 10000 mSv (10 Sieverts): Nausea, loss of appetite. Hemorrhaging, infection, diarrhea, skin peeling, central nervous system impairment. Death is likely even with hospitalization.
  
 
> 10000 mSv (10 Sieverts): Incapacitation followed by death.
 
> 10000 mSv (10 Sieverts): Incapacitation followed by death.
 +
 +
For most normal purposes it is not useful to worry about exposures even as low as 1 Sievert because you normally wouldn't be in a situation where you would receive such a high dose of radiation. In other words, even 1 Sievert is a fairly high dose. Of more typical interest are the '''cumulative''' effects of chronic radiation exposure. An acute dose as low as 10 mSv (0.01 Sievert) cannot be felt and might cause no injury, but if you were exposed to 10 mSv per day then this would likely have a negative impact on your long term health.
  
 
=== Typical Dose ===
 
=== Typical Dose ===
Line 196: Line 262:
  
 
* Radon gas is the number two cause of lung cancer in the US.
 
* Radon gas is the number two cause of lung cancer in the US.
 +
 +
[[Image:radiation-dosage-chart.png|Radiation Dosage Chart]]
  
 
== shielding ==
 
== shielding ==
Line 205: Line 273:
 
A non-intuitive fact of shielding is that the attenuation depends only on the energy level. Higher power will mean more photons, but the same percentage will be blocked.
 
A non-intuitive fact of shielding is that the attenuation depends only on the energy level. Higher power will mean more photons, but the same percentage will be blocked.
  
=== For kVp = 80 kV ===
+
Note that >99% attenuation might sound good, but an x-ray machine generates trillions of photons, which means there are still a lot left after 99% attenuation. This is in the main beam. 1/16th shielding is fine for backscatter x-ray photons. Behind the target you should have a a few inches of lead to absorb what remains of the main beam. And rather than rely only on calculations you should take measurements to be sure the shielding performs as expected.
 +
 
 +
=== Attenuation table for kVp = 80 kV ===
 +
 
 +
'''This table does not seem correct.''' The '''HVL''' for lead at 80 kV is...?
 +
 
 +
attenuation coefficient, µ = 2<sup>-n</sup>, where '''n''' is the number of layers. If I use five layers of lead, '''n = 5''', I get '''µ = 2<sup>-n</sup> = 0.03125''', which should give only approximately 97% attenuation. Am I using '''µ''' wrong?
  
 
*0.01  mm Pb:  25% x-ray photons attenuated (shielded, blocked, absorbed, etc.)
 
*0.01  mm Pb:  25% x-ray photons attenuated (shielded, blocked, absorbed, etc.)
Line 217: Line 291:
  
 
So 1.5875 mm (1/16<sup>th</sup> inch) lead sheet should be sufficient for a medium sized dental x-ray head of 80 kV.
 
So 1.5875 mm (1/16<sup>th</sup> inch) lead sheet should be sufficient for a medium sized dental x-ray head of 80 kV.
 +
 
=== Second International Congress of Radiology Recommended Thickness of Lead Shielding for X-ray Rooms ===
 
=== Second International Congress of Radiology Recommended Thickness of Lead Shielding for X-ray Rooms ===
  
Line 308: Line 383:
 
</pre>
 
</pre>
  
== misc ==
+
== Image processing ==
  
[http://www.amptek.com/coolx.html Miniature X-Ray Generator with Pyroelectric Crystal] Heating and cooling of the pyroelectric crystal LiNbO3 causes it to emit electrons. When these strike a copper target the target will emit x-rays through bremsstrahlung emission. [http://www.radius-health.com/ Radius Health] is working on a more sophisticated device that uses the same principle.
+
The image that results from the composite of the 1D sections has very low contrast. It is simple to expand the dynamic range of the image, but also note that the contrast is weighted towards the center. This is because the radial sections favor the center of the image. The center of the target has the most overlapping sections so the pixels near the center contribute more signal to the average. It's difficult to apply a uniform contrast enhancement over the entire image because the result will leave the edges too dark or the center too light. What is needed is contrast enhancement that will be weighted based on the distance from the center of the image.
 
+
[http://www.lohmannx-ray.com/index.html Lohmann x-ray tubes] - "German engineering" may be a cliché, but no other phrase comes to my mind after I held one of these x-ray tubes. I only wish their web site had more pictures.
+
 
+
*Pyroelectric X-Ray Generator, J. D. Brownridge. Nature, vol. 358, 287-288 (1992)
+
*Time Dependence of X-Ray Yield From Two Crystal X-Ray Generators, S. M. Shafroth, W. Kruger, J. D. Brownridge, Nucl. Inst. Methods in Physics Research, A422 (1999), Proceeding of the ninth Symposium on Radiation Measurements and Applications, Univ. Michigan, Ann Arbor, May 11-14, 1998
+
*Investigation of Pyroelectric Generation of X-Rays, J. D. Brownridge and Sol Raboy, J. Appl. Phys., 86, 640 (1999)
+
*[https://www.novapublishers.com/catalog/product_info.php?products_id=2176 J.D. Brownridge, S.F. Shafroth "Electron and Positive Ion Beams and X-rays Produced by Heated and Cooled Pyroelectric Crystals such as LiNbO3 and LitaO3 in Dilute Gases: Phenomenology and Applications,"]
+
*Pressure Dependence of Energetic (=160 keV) Focused Electron Beams Arising From Heated or Cooled (LiNbO3) Pyroelectric Crystals, James D. Brownridge and Stephen M Shafroth. Appl. Phys. Lett. 83, 1477(2003)
+
*[http://www2.binghamton.edu/physics/docs/g.pdf Information presented at CAARI 2004 in Fort Worth, TX, October 10-15, 2004]
+
J. R. Hird, C. G. Camara, and S. J. Putterman, A triboelectric x-ray source, Appl. Phys. Lett., 2011, 98 (13).
+
 
+
http://www.wikiradiography.com/
+
 
+
http://www.wise-uranium.org/calc.html
+
 
+
http://www.nukeworker.com/
+
  
 
== A more complex example ==
 
== A more complex example ==
Line 335: Line 394:
  
 
The following target is similar to the one used before except that it now has a screen added. The algorithm that synthesizes the radial sections was modified to treat any red are as totally opaque. The result is that anything inside the cup shaped screen is totally hidden. The dense area also throws off the contrast so that it is difficult to see the notch at the top of the target, but you can more or less make it out. These artifacts are known as '''computed tomography streak artifacts'''. They are seen in human subjects with metal implants.
 
The following target is similar to the one used before except that it now has a screen added. The algorithm that synthesizes the radial sections was modified to treat any red are as totally opaque. The result is that anything inside the cup shaped screen is totally hidden. The dense area also throws off the contrast so that it is difficult to see the notch at the top of the target, but you can more or less make it out. These artifacts are known as '''computed tomography streak artifacts'''. They are seen in human subjects with metal implants.
 +
 
[[image:targeto.png|frameless]] [[image:targeto_out.png|frameless]]
 
[[image:targeto.png|frameless]] [[image:targeto_out.png|frameless]]
  
== Image processing ==
+
== first reconstruction ==
  
The image that results from the composite of the 1D sections has very low contrast. It is simple to expand the dynamic range of the image, but also note that the contrast is weighted towards the center. This is because the radial sections favor the center of the image. The center of the target has the most overlapping sections so the pixels near the center contribute more signal to the average. It's difficult to apply a uniform contrast enhancement over the entire image because the result will leave the edges too dark or the center too light. What is needed is contrast enhancement that will be weighted based on the distance from the center of the image.
+
I believe this was my first successful CT reconstruction. This is actually a cross-section of a piece of perforated ice (frozen water).
 +
 
 +
[[image:radon-reconstruction-first.png]]
 +
 
 +
== A real example ==
 +
 
 +
Here are some CT scans of a muskrat skull.
 +
 
 +
[[image:lynx-scan.gif]] --> [[image:lynx-radon.gif]] --> [[image:lynx-ct-reconstructions.gif]]
 +
 
 +
This is my second successful reconstruction from a muskrat skull. This is pretty noisy, but you can tell it's an axial slice of a skull.
 +
 
 +
[[image:reconstruction_2.png|frameless]]
 +
 
 +
I was able to clean up the source radon images and regenerate a cleaner reconstruction. This is a slightly different depth, as well.
 +
 
 +
[[image:reconstruction_3.png|frameless]]
 +
 
 +
Here is an animated GIF of every fifth frame of the stack of CT reconstructions.
 +
 
 +
[[image:ct-sections.gif]]
 +
 
 +
== cone beam reconstruction distortion ==
 +
 
 +
Here are some contrast enhanced views of reconstructions of a Lynx skull. Each of these reconstructions use the '''same''' dataset. The first is a reconstruction using only half the images centered at 60 degrees. The second is an average of 90 reconstructions at all angles. The third is a "minimum composite" of 90 reconstructions at all angles (sort of like the differences of all reconstructions).
 +
 
 +
Tomography deals with how you can take a set of horizontal projections of a target and use them to reconstruct what the target would look like from above. One easy method to calculate a tomographic reconstruction is to use a function known as the inverse Radon transform -- also known as filtered back-projection. Projections are just the shadows cast by a target between a light source and a screen. X-rays work nicely on humans because they go all the way through and don't refract. A cone-beam describes how a light bulb projects light. Most x-ray sources are pretty much like a light-bulb. A parallel-beam describes how a LASER beam projects light. The inverse Radon transform assumes that the set of projections you feed into it come a parallel-beam source. Luckily, we can cheat and feed cone-beam projections into the inverse Radon transform and it will still generate a reconstruction, but it will introduce annoying distortions. The purpose of the video was to illustrate the distortions you get by feeding cone-beam projections into the inverse Radon transform.
 +
 
 +
There are two types of distortion the cone-beam creates. First, there is perspective distortion. An object closer to the beam source will project a larger shadow than an object farther from the source. The second type of distortion is parallax distortion. Features appear to move up and down as the subject is rotated in the horizontal plane. This means that blurred features above and below the slice you want will end up in your reconstruction.
 +
 
 +
I have attached four images to help show what is going on. These are all reconstructions of the same slice. They all show the same target but with different distortions. These are frames from of the video, but I added Gaussian blur and enhanced the contrast.
 +
 
 +
Frame 1 shows a single reconstruction from a specific angle, and Frame 2 shows a single reconstruction of the same target from a different angle. If I had used parallel-beam projections then it should not matter what angle I chose to use in reconstructing the slice. Both Frame 1 and Frame 2 would be identical. The differences that appear are due to cone-beam distortions. Notice the streak on the left nose of Frame 1 that curves up. Compare that to the streak on the left nose of Frame 2 that curves down.
 +
 
 +
It turns out that from the projections I captured for this particular experiment I was able to reconstruct 90 different alternatives for the same slice. Each alternative reconstruction is similar to the others, but differs in the distortion it reveals. The video showed the stack of 90 alternatives at 10 frames per second in order to animate how the distortions change with the reconstruction angle.
 +
 
 +
So the video shows the 90 alternatives animated through time, but what we really want is a single still frame that shows the "true" slice. Frame 3 shows what you get if you simply average the 90 alternatives into a composite frame. It's better than any of the single frames, but it's still fuzzy. Frame 4 shows the composite using the minimum value of each pixel in the stack of 90 images. There are other ways to composite the stack of 90 images into a single still frame. I'm still working on the best method.
 +
 
 +
[[image:frames.png]]
 +
 
 +
[[image:cone-beam-enh-a60.png]]
 +
 
 +
[[image:cone-beam-enh-avg.png]]
 +
 
 +
[[image:cone-beam-enh-min.png]]
  
 
== Source code ==
 
== Source code ==
Line 351: Line 455:
 
Click here to download: [http://www.noah.org/engineering/src/python/x-ray_cat_scan/cat_scanner.py cat_scanner.py]
 
Click here to download: [http://www.noah.org/engineering/src/python/x-ray_cat_scan/cat_scanner.py cat_scanner.py]
 
<include src="/home/noahspurrier/noah.org/engineering/src/python/x-ray_cat_scan/cat_scanner.py" highlight="python" />
 
<include src="/home/noahspurrier/noah.org/engineering/src/python/x-ray_cat_scan/cat_scanner.py" highlight="python" />
 +
 +
== Linux Ubuntu Packages ==
 +
 +
The following packages can be useful when working with images.
 +
 +
<pre>
 +
apt-get -q -y install ctsim imagemagick aeskulap
 +
</pre>
  
 
== misc ==
 
== misc ==
Line 359: Line 471:
  
 
http://www.nukeworker.com/
 
http://www.nukeworker.com/
 +
 +
http://www.sams-xrays.com/
 +
 +
[http://code.google.com/p/cat-py/ cat-py]
 +
 +
[http://www.amptek.com/coolx.html Miniature X-Ray Generator with Pyroelectric Crystal] Heating and cooling of the pyroelectric crystal LiNbO3 causes it to emit electrons. When these strike a copper target the target will emit x-rays through bremsstrahlung emission. [http://www.radius-health.com/ Radius Health] is working on a more sophisticated device that uses the same principle.
 +
 +
[http://www.lohmannx-ray.com/index.html Lohmann x-ray tubes] - "German engineering" may be a cliché, but no other phrase comes to my mind after I held one of these x-ray tubes. I only wish their web site had more pictures.
 +
 +
*Pyroelectric X-Ray Generator, J. D. Brownridge. Nature, vol. 358, 287-288 (1992)
 +
*Time Dependence of X-Ray Yield From Two Crystal X-Ray Generators, S. M. Shafroth, W. Kruger, J. D. Brownridge, Nucl. Inst. Methods in Physics Research, A422 (1999), Proceeding of the ninth Symposium on Radiation Measurements and Applications, Univ. Michigan, Ann Arbor, May 11-14, 1998
 +
*Investigation of Pyroelectric Generation of X-Rays, J. D. Brownridge and Sol Raboy, J. Appl. Phys., 86, 640 (1999)
 +
*[https://www.novapublishers.com/catalog/product_info.php?products_id=2176 J.D. Brownridge, S.F. Shafroth "Electron and Positive Ion Beams and X-rays Produced by Heated and Cooled Pyroelectric Crystals such as LiNbO3 and LitaO3 in Dilute Gases: Phenomenology and Applications,"]
 +
*Pressure Dependence of Energetic (=160 keV) Focused Electron Beams Arising From Heated or Cooled (LiNbO3) Pyroelectric Crystals, James D. Brownridge and Stephen M Shafroth. Appl. Phys. Lett. 83, 1477(2003)
 +
*[http://www2.binghamton.edu/physics/docs/g.pdf Information presented at CAARI 2004 in Fort Worth, TX, October 10-15, 2004]
 +
J. R. Hird, C. G. Camara, and S. J. Putterman, A triboelectric x-ray source, Appl. Phys. Lett., 2011, 98 (13).
 +
 +
http://www.wikiradiography.com/
 +
 +
http://www.wise-uranium.org/calc.html
 +
 +
http://www.nukeworker.com/
 +
 +
http://www.rtstudents.com/
 +
 +
http://www.rtstudents.com/pacs/free-dicom-viewers.htm

Latest revision as of 17:39, 4 March 2015


See also:

CT scanner (x-ray CAT scan)

Some of the techniques used in Tomography were developed by the radiologist Alessandro Vallebona in the 1930's. Vallebona created a technique to overcome the problem of trying to take clear x-ray images of targets lost in the distracting clutter of foreground and/or background objects. How do you isolate the target from the clutter? For example, say you wanted to create a cross-section image of the spine. This would be difficult because no matter that angle you take the image from you will get the ribs and internal organs getting in the way. Vallebona's technique was simple and clever. While taking a long exposure he would rotate the x-ray emitter one direction while simultaneously rotating the film in the opposite direction. Anything at the center of rotation would appear still, while objects away from the center of rotation would be blurred away. Special equipment is needed to allow the x-ray emitter to smoothly track the film so that the x-ray emitter and film do not move relative to each other.

If this sounds confusing then imagine you are outside a picket fence that surrounds the house. You can't take a good photo of the house with all the picket slats blocking the view, but if you were looking at the house while sitting in a car driving past the house then the picket slats would blur together and the fence would appear to disappear. To take advantage of this effect with your camera you can't use a fast exposure because that would freeze the slats as if you were not moving. You need a long exposure to blur the fence away, but this would also blur the house; however, if you pivot the camera to track the house while you make the exposure then the wooden slats would still stay blurred, but the house would appear still. A similar trick is used to photograph a race car as it speeds by. Using a high-speed shutter will freeze everything as if there were no motion and you end up with a boring picture of a car sitting in the road with a bunch of people staring at it. But if take the shot with a slow shutter while you track the car speeding past you then the road and the spectators will be a speeding blur, but the car will be in focus.

Synthetic Aperture Photography or Synthetic Aperture Imaging seems to be closely related, if not completely analogous to tomography. Slices of the images used in building a synthetic film plane look exactly like a Radon transform.

Back to x-rays...

In a modern Computed Tomography (CT or CaT) system an x-ray emitter and a 1-dimensional detector band is rotated 360 degrees with the target in the middle. The detector band records how much the target attenuates the x-rays at different angles. A series of these snapshot recordings are saved at regular intervals. The series of 1-dimensional bands are used to reconstruct the 2-dimensional plane that intersects a projection of each bands. The number of bands in the series can vary. The more that are recorded, the better the reconstruction. The most common method is called filtered back projection. This is an easy algorithm to implement. Seeing the original reconstructed from a series of projections is rather magical. It seems too easy, but you get what you pay for. Filtered back projection suffers from a number of flaws including artifacts, ambiguous reconstruction shadows, and sensitivity to noise and missing data. No method is perfect, but there are alternatives which are better than filtered back projection. One alternative method is called iterative reconstruction. This method is much more complex and computationally expensive than filtered back projection, but it deals better with noise, incomplete data, and it produces fewer artifacts. There are many algorithms that follow the iterative reconstruction method. One example is Algebraic reconstruction.

In this demo I synthesize a set of 1-dimensional projections of a target image at different angles, then I reconstruct an approximation of the original target image.

Johann Radon defined a transform that for a given target gives a set of 1-dimensional projections of the average of the target's density along lines parallel to a given angle. This transform is called the Radon transform. In our case, the target's "density" is the pixel's brightness. The set of 1-dimensional projections is called a "sinogram", and is graphed along an axis for the angle each 1-dimensional projection.

The Radon transform is related to the CT scanner's recordings of x-ray beam attenuation. In fact, a CT scanner creates a Radon transform of a physical target. There is one minor distinction to note here. The value of an x-ray beam attenuation through a target is exponential. To make the x-ray recordings equivalent to a Radon transform density projection you would need to take the log of the recorded x-ray values. I use the Radon transform to simulate the set of 1-dimensional projections I might get from a CT scanner. Since I'm generating the Radon transform directly from the image, not using real x-ray recording values, I don't need to take the log of the values.

Johann Radon also showed that if you have a sinogram of a target then you can reconstruct an approximation of the original target with an inverse Radon transform. This simply overlays each 1-dimensional projection over each other.

The following are crude examples of filtered back projection that do not show how this technique would actually be implemented. In particular, I don't actually do filtering part of filtered back projection, so this is just back projection. In the real world the image data would be processed and filtered in the frequency domain (usually after taking the FFT). These examples demonstrate how far you can get with simple tools.

In the following example the 1-dimensional projections of the target are made using only 45 degree rotations of the target image. Each projection is shown located at an angle from which it was generated relative to the target.

target.png section 4 0.png
section 4 3.png section 4 2.png section 4 1.png

After adding the four 1-dimensional projections together (composite overlay) you get the following CT image:

section 4 0.png+section 4 3.png+section 4 2.png+section 4 1.png = target 4 out.png

As you can see, using only 90 degree projections does not give very good results. The more sections you use the better you can approximate the original image. I found that I needed to use 8 projections to even begin to get a recognizable image. The following example is generated from 8 projections:

targetd animated.giftarget 8 out.png

Here is CT image made from 32 radial sections. 32 seems to be a good number for a CT image at this resolution:

target 32 out.png

This simple algorithm will work with very complex images. Given a photograph I synthesized 32 1-dimensional scans and then regenerated the photograph using the CT algorithm.

Shepp-Logan Phantom

Here are the results using the Shepp-Logan Phantom test The Shepp-Logan Phantom is standard test image used in tomography literature to illustrate the quality of reconstruction algorithms. It's the "Lena" test image of the 3D imaging community. I would have chosen Lena Söderberg instead.

Beam Hardening

Electronic sources of x-rays generate polychromatic beams. That means the photons have a broad spectrum of energy (frequencies). This causes distortions when raw data from these sources is used in a CT reconstruction.

Why is this bad? Remember the 1-dimensional projection recordings are assumed to measure the attenuation of the x-ray beam through the target. Attenuation is exponential for x-ray photons of a single energy. The photos are either absorbed or transmitted by the same amount through a material of a given density. Photons of a different energy will be absorbed or transmitted by a different amount. If the attenuation measurement is made up of the combined attenuation of many different photo energy levels then measurement is no longer exponential. It is no longer possible to convert to a simple density projection by taking the log.

The effect will be a bogus artifact that makes it appear as if the outer edges of a target are more dense than internal features. Internal features can be totally lost.

One way to correct for this is to filter the x-ray source. This is fairly easy to achieve by having the x-ray beam first pass through a metal plate designed to filter out the lower energy photos while allowing high energy photons to continue. Thus the x-ray photons that do hit the target will be of a greater proportion of high energy photons. This narrows the spectrum, causing the attenuation recordings to more closely follow an exponential curve or at least a continuous function. Copper or Aluminum plates of various thicknesses are often used as filters.

It is difficult to filter for this effect using a software mapping from the recorded attenuation values to an exponential curve because there will not be a continuous relationship between density and attenuation. The attenuation function will change based on angle and the density of the materials involved in the attenuation. The entire premise of CT reconstruction is based on the fact that materials of different densities will always attenuate the beam by the same amount.

physical process control variables

peak kilovoltage (kVp) is the highest voltage supplied to the x-ray emitter. This sets the upper bound on the x-ray photon energy emitted. X-ray photons below this level will still be emitted, but none above this level will be emitted. This peak effects the radiographic contrast.

radiographic contrast refers to the difference between the number of x-ray photons that the target absorbs versus the number that effect the detector. High energy x-rays will penetrate farther. The effects of energy and target composition are complex. Sometimes better image contrast can be obtained with lower energy levels, but that might also require long exposures or higher radiographic density. Very high energy x-rays may zip right through a low density target. Even with very short exposures you may not get enough contrast between the target and background to form good image details. In general high energy x-rays lower contrast, but may be necessary to penetrate a dense or thick object or to produce an image using a faster exposure time than a lower energy source. This is important with live targets where you want to limit damage from radiation exposure. In fact, filters are often used in front of the target to remove low-energy x-rays from the spectrum since these only add useless radiation exposure to the target and will not contribute information to the image.

radiographic density refers to the number of x-ray photons emitted by the x-ray emitter that make it to the detector. This is mostly controlled by the current supplied to the x-ray tube. The higher the current the more photons you get (higher radiographic density). The photons are not weaker or stronger. In general, raising current will emit more x-ray photons with the same spectrum and peak kilovoltage energy level. The peak kilovoltage also contributes a smaller portion to the radiographic density. High energy x-ray photons produce more scattering. These scattered photons may actually hit the detector and so increase the radiographic density. The downside is that if you are trying to form an image these photons only add useless noise because they were scattered from their original direction.

Enhancing image contrast

Scatter hurts image contrast. Scatter can be limited using beam apertures.

Controlling the beam before it reaches the target

Before the target a slit aperture should be used to force the beam from a cone into a fan. Additional tube or silhouette apertures may be added to reduce scatter from x-rays bouncing off equipment outside the target area.

Controlling the beam after the target, before it reaches the sensor

The target will both attenuate and scatter the beam. Only the attenuated beam is useful. The scatter photons only contribute noise (haze). These can be reduce by using a grid before the sensor. The sides of the grid will trap scatter photons because these photons are at a different angle from the main beam. Grids are often made of thin sheets of lead interspersed with support layers made of aluminum or plastic that are transparent to x-rays. The lead acts as the grid walls. The interspersed layers are just for support.

x-ray vs. gamma

X-rays and gamma rays are basically the same thing -- photons. The distinctions between when to use one term versus another is not standardized. Often the term gamma ray refers to photons that come from the atomic nucleus (nuclear decay, annihilation, fusion, etc.), and the term x-ray refers to photons that come from interactions with electrons. Generally, gamma photons are higher energy than x-ray photons, but this is not a rule. Some radioactive isotopes emit gamma photons when they decay that have lower energy than small, diagnostic x-ray machines. There are linear accelerators that emit megavolt photons using a process essentially no different than a small, diagnostic x-ray machines.

Energy, frequency, Electron volts

The amount of energy a photon carries is determined by its frequency (v) or wavelength (λ).

E = h * v
  or
E = h * c / λ
  or
E eV = 1240 eV nm / λ nm

Where Planck's Constant, h = 4.135667516(91)×10−15 eV·s, and the Speed of Light, c = 299792458 m/s.

So an 80 keV x-ray beam emits photons with a peak energy of 80 keV, this the wavelength:

  80 keV = 1240 eV nm / λ
  λ = 1240 eV nm / 80 keV = 1240 eV nm / 80000 eV
  λ = 0.0155 nm

scintillator phosphor

Bismuth germanate (BGO)

  • Name: Bismuth germanate
  • Note: Not used for imaging. Used as a scintillator detector.
  • Chemical Composition: Bi4Ge3O12
  • Peak Wavelength: 480 nm

Cesium iodide

  • Name: Cesium iodide
  • Note: highly hygroscopic!. Less light spread than gadolinium oxysulfide, but not as bright. Used in x-ray image intensifiers and CT scanners.
  • Chemical Composition: CsI, CsI:Na+, CsI:Tl+
  • Peak Wavelength: 545 nm (Green)
  • Decay Time: 5 µs

Gadolinium oxysulfide (GOS)

  • Name: Gadolinium oxysulfide, or gadolinium sulfoxylate, P43 (EIA) or GY (WTDS)
  • Note: Excellent scintillator for x-rays < 250nm. More light spread than cesium iodide. Usually Terbium activated (rarely Praseodymium activated).
  • Chemical Composition: Gd2O2S:Tb
  • Peak Wavelength: 545 nm (Green), Chromaticity Coordinates=(0.344, 0.568)
  • Decay Time: 1ms to 10%
  • Quantum Yield (photons/eV/electron): 0.05
  • Emission Efficiency: 13%
  • Absorption: K-edge @ 50.22 keV
  • Effective atomic #: 59.5
  • Vendor Brands: 3M Trimax 12, Agfa Curix Ortho Regular -- This is a good one, Agfa Curix Ortho Fast, Fuji HR Fast, Kodak Lanex Fast, Kodak Min-R 2190 screen (used for mammography; high-contrast, low dose), MCI Optonix Green 600, Soyee Green Ultra (800 speed) (also known as KG-8 Green) -- This is my current preference, Soyee Green Special (400 speed)

Yttrium silicate

  • Name: Yttrium silicate, P47 (EIA) or BH (WTDS)
  • Note: Fast decay
  • Chemical Composition: Y2SiO5:Ce3+
  • Peak Wavelength: 400nm (Violet-blue), Chromaticity Coordinates=(0.173, 0.088)
  • Decay Time: 55ns
  • Quantum Yield (photons/eV/electron): 0.055

definitions

  • EIA- Electronics Industries Association of the USA.
  • WTDS- Worldwide Phosphor Type Declaration System.

The "x-ray man" in San Francisco Bay View Shipyard

He used to rent space from HomerLea-at-aol-dot-com. I met him a couple times. I forget his name.

x-ray sources

Small diagnostic x-ray heads: 60 kVp to 80 kVp

Mammography x-ray Mo/Mo tube (molybdenum target and molybdenum filter): 35 kVp, The characteristic radiation of molybdenum peaks at 18 (Ka) and 20 keV (Kb). The molybdenum target gives a narrow spectrum in the 18.20 keV range, which combined with the molybdenum filter cuts the peak abruptly at 20 keV.

x-ray head construction

Most small x-ray machines combine the high voltage step-up transformer and circuitry and the x-ray emitter tube into a single, sealed, and insulated unit called the head. So when a dentist aims the x-ray head at your mouth remember that single unit contains most of the essential parts of the x-ray machine. Everything else is just timing and power control. The power feed into the x-ray head typically consists of a minimum of a Ground line, a Filament Heater line, and a Tube Emitter line, so that is three wires minimum. Some units may also have a few lines that return power from the transformer secondary to sense that the head is powered up and ready. The power feed lines are almost always AC. The Filament Heater line drives a filament inside the emitter tube which is exactly like a light bulb filament. The Filament Heater line usually carries from 1.5 VAC to 12 VAC at less than 10 watts. The Emitter line typically carries between 90 VAC and 350 VAC. It is not meant to drive much power, but they will shock you. The Emitter' AC power is stepped up to 50000 to 110000 Volts inside the head. Sometimes this is rectified to DC, but often it is left as AC. X-ray tubes operate in DC mode, but many also function as a thermionic diode, so they automatically rectify AC into DC. Many older, smaller heads make use of this effect, so you won't find any other rectifying circuitry in the head. In effect, the x-ray beam will pulse or flicker at half the AC frequency, which is half of 60 Hz in the US. Old high power systems used separate Kenotron rectifier tubes and giant inductors and capacitors to smooth the power. These Kenotron tubes look a bit like emitter tubes. You would only find these in giant machines found in hospitals. Often the floor and frame of the building had to be specially constructed to support the weight. Modern small x-ray machine use high-frequency switching power supplies that output clean DC and reduce transformer weight.

On some units the Filament Heater line comes on before the Emitter power in order to preheat the filament. If the unit indicates READY this usually means that it sees power going to the Filament Heater. When you trigger the machine a timer relay then sends power to the Emitter line. The timer will automatically shut off the relay after a precise interval even if you do not release the trigger. In fact, usually you must hold the trigger closed the entire time until the timer shuts off the Emitter; otherwise, power is cut as soon as you release the trigger... On most machines all of the settings do little more than adjust the time the relay stays on. Some machines allow you to adjust Emitter voltage and Filament Heater power.

If you have a bare tube available you can see the filament glow a bright cherry red. Usually it is not a bright, white glow like a real light bulb. Again, most do not glow like a light bulb. If it glows that brightly then you may be burning the filament. Check the specs for the tube.

Ritter x-ray heads

See also Ritter_x-ray

I have some experience working with Ritter units. They are typically rated at 70 to 80 kV. They are a bit heavy, but they are built like a tank. They have very little radiation leakage from the head.

The J-series heads are filled with Sulfur hexafluoride dielectric gas. Generally you never need to open the heads, but it is impossible to open and service the heads without letting this gas escape. The head will almost certainly not function without the dielectric gas. It may be possible to drill and tap two holes in the head for fill and drain holes. These could then be used to refill the head with a dielectric oil, or even refill with Sulfur hexaflouride. The heads are filled at the factory without any gas fittings, so attempting to refill them in a small shop would be difficult without modifying the head with gas fittings. Oil would be easier if one is going through the trouble of adding fittings. Of course, oil is messy.

insulating oil bath

High voltage dielectric insulating oil: Dow Corning 710 silicone oil

Mineral oil works.

Motor oil is bad. Probably the detergent additives ruin the insulating properties. Used motor oil is a terrible idea -- fine suspended carbon and metal particles are not known for enhancing insulation properties.

Radiation Dosimetry

1 Sievert (1 Sv) = 100 rem

1 millisievert (1 mSv) = 0.001 Sv = 100 mrem = 0.1 rem

1 microsievert (1 μSv) = 0.000001 Sv = 0.1 mrem

The conventional units for the Sievert time derivative is mSv/h (millisievert per hour).

Safety

When working with radiation in any form your first investment in equipment should be radiation detection. You also need an understanding of what you are measuring. You wouldn't stick your finger into an electrical socket without first testing with a volt meter, so neither should you energize a tube without some means of measurement.

A Geiger counter can make an excellent measurement device. The values they give can be difficult to use and interpret without training. Geiger counters actually make a very interesting topic of their own. One problem with a Geiger counter is that they can miss extremely short pulses of radiation. Some types of x-ray sources emit a stream of pulses 20 to 60 nanoseconds long. The total radiation dose may be quite high, but the Geiger counter simply doesn't see pulses so short.

A dosimeter is a useful tool. Dosimeters are designed specifically for human safety, so they tend to be easy to use and understand. They also use integrating detectors such as ionization chambers, quartz fiber dosimeters, and film dosimeters. These will detect even very short pulses of x-ray radiation, but they don't always give instant readings. They are most often used to measure cumulative radiation exposure (dose). I use a dosimeter from [1], which requires a yearly subscription fee for processing.

Some people have told me they heard that small amounts of radiation may acually be good for you (a theory known as hormesis). This is an interesting subject; however, I don't base my safety on an unsubstantiated theory that I know little about. The most prudent path to follow is to ensure zero exposure.

Acute Radiation Doses

The Sievert (SEE-vert) scale is not much more than a magnification of the rem scale. Both are intended to measure radiation from the point of view of damage rather than just measuring quantity. All the Sievert scale does is more the decimal point two places to the right. One reason you might prefer the Sievert scale to the rem scale is because whole numbers in the Sievert scale nicely fit into an easy to remember 1-10 scale of danger; although, note that even 1 Sievert will make you very sick.

1 Sievert
not dead (but sick)
5 Sievert
50% dead
10 Sievert
100% dead

Here is the scale broken down into more detail:

0 -- 250 mSv: No symptoms of injury are felt. No signs of injury.

250 -- 1000 mSv (1 Sievert): Nausea and loss of appetite. Possible damage to bone marrow, lymph nodes and spleen.

1000 -- 3000 mSv (3 Sieverts): Nausea, loss of appetite. Possible risk of infection; severe bone marrow, lymph node, and spleen damage. Most, but not all, recover from injuries.

3000 -- 6000 mSv (6 Sieverts): Nausea, loss of appetite. Hemorrhaging, infection, diarrhea, skin peeling. Death without hospitalization. Note: LD50 after 30 days is 5000 mSv (5 Sv). That is, you have a 50% chance of death within a month if exposed to 5000 mSv (5 Sv).

6000 -- 10000 mSv (10 Sieverts): Nausea, loss of appetite. Hemorrhaging, infection, diarrhea, skin peeling, central nervous system impairment. Death is likely even with hospitalization.

> 10000 mSv (10 Sieverts): Incapacitation followed by death.

For most normal purposes it is not useful to worry about exposures even as low as 1 Sievert because you normally wouldn't be in a situation where you would receive such a high dose of radiation. In other words, even 1 Sievert is a fairly high dose. Of more typical interest are the cumulative effects of chronic radiation exposure. An acute dose as low as 10 mSv (0.01 Sievert) cannot be felt and might cause no injury, but if you were exposed to 10 mSv per day then this would likely have a negative impact on your long term health.

Typical Dose

Average hourly individual background radiation dose: 0.00023 mSv/h (0.023 mrem) = 0.00552 mSv/day

Dental radiography: 0.005 mSv (equivalent to one full day of average background radiation)

Brain CT Scan: 0.8 -- 5 mSv (equivalent to one full year of average background radiation)

Chest CT scan: 6 -- 18 mSv (equivalent to three full years of average background radiation)

ICRP recommended limit for nuclear disaster volunteers: 500 mSv

ICRP recommended limit for nuclear disaster volunteers while rescuing lives: 1000 mSv

Granite countertop: -- (Granite contains Uranium)

Brazil nut: -- One of the most naturally radioactive foods. The tree concentrates natural Radium from the roots into the fatty seeds.

Banana: -- Concentrates Potassium. All natural Potassium contains a small percentage of radioactive isotope.

Potato: -- Concentrates Potassium. All natural Potassium contains a small percentage of radioactive isotope.

Human: -- Concentrates Potassium. All natural Potassium contains a small percentage of radioactive isotope.

  • Radon gas is the number two cause of lung cancer in the US.

Radiation Dosage Chart

shielding

1/16th inch = 1.5875 mm

Generally attenuation decreases with energy level, so use the kVp (peak kilovolt) value to determine the shield thickness to block the desired percentage of photons. Photon energy levels below the kVp will be blocked even more.

A non-intuitive fact of shielding is that the attenuation depends only on the energy level. Higher power will mean more photons, but the same percentage will be blocked.

Note that >99% attenuation might sound good, but an x-ray machine generates trillions of photons, which means there are still a lot left after 99% attenuation. This is in the main beam. 1/16th shielding is fine for backscatter x-ray photons. Behind the target you should have a a few inches of lead to absorb what remains of the main beam. And rather than rely only on calculations you should take measurements to be sure the shielding performs as expected.

Attenuation table for kVp = 80 kV

This table does not seem correct. The HVL for lead at 80 kV is...?

attenuation coefficient, µ = 2-n, where n is the number of layers. If I use five layers of lead, n = 5, I get µ = 2-n = 0.03125, which should give only approximately 97% attenuation. Am I using µ wrong?

  • 0.01 mm Pb: 25% x-ray photons attenuated (shielded, blocked, absorbed, etc.)
  • 0.04 mm Pb: 55%
  • 0.10 mm Pb: 70%
  • 0.125 mm Pb: 80%
  • 0.25 mm Pb: 96%
  • 0.35 mm Pb: 97%
  • 0.50 mm Pb: 99%
  • 1.00 mm Pb: >99%

So 1.5875 mm (1/16th inch) lead sheet should be sufficient for a medium sized dental x-ray head of 80 kV.

Second International Congress of Radiology Recommended Thickness of Lead Shielding for X-ray Rooms

Note, this is for backscatter radiation only. Direct beam-line should terminate into a much thicker sink.

Second International Congress of Radiology Recommended Thickness of Lead Shielding for X-ray Rooms
kVp thickness millimeters thickness inches weight in pounds per square foot
75 1.0 0.039 (go with 1/16") 2-1/2
100 1.5 0.059 (go with 1/16") 4
125 2.0 0.079 (go with 1/8") 5
150 2.5 0.098 (go with 1/8") 7
175 3.0 0.118 (go with 1/8") 8
200 4.0 0.157 (go with 1/4") 10
225 5.0 0.197 (go with 1/4") 13
300 9.0 0.354 (go with 1/2") 24
400 15.0 0.591 (go with 3/4") 38
500 22.0 0.866 (go with 1") 56
600 34.0 1.343 (go with 1-1/2") 81
900 51.0 2.000 (go with 2") 120

Half Value Layer calculations

Formula to get the total attenuation for a given number of half-value layers where n = number of half-value layers
attenuation coefficient, µ = 2-n
Formula to get the n number of half-value layers needed to attenuate by the given attenuation coefficient, µ
n = -log2(µ) or n = - ln(µ) / ln(2)
Half-Value Layer, mm (inch)
Peak Voltage (kVp) Lead Concrete
50 0.06 mm (0.002") 4.32 mm (0.170")
100 0.27 mm (0.010") 15.10 mm (0.595")
150 0.30 mm (0.012") 22.32 mm (0.879")
200 0.52 mm (0.021") 25.00 mm (0.984")
250 0.88 mm (0.035") 28.00 mm (1.102")
300 1.47 mm (0.055") 31.21 mm (1.229")
400 2.50 mm (0.098") 33.00 mm (1.299")
1000 7.90 mm (0.311") 44.45 mm (1.750")

X-Ray Mass Attenuation Coefficients

X-ray mass attenuation coefficients for select elements.

See also the NIST values of the mass attenuation coefficient, μ/ρ, and the mass energy-absorption coefficient, μen/ρ, as a function of photon energy.

atomic number "Z", Element, atomic number to mass "Z/A", mean excitation energy "I" (eV), Density "ρ" (g/cm3)
 4, Be Beryllium,  0.44384,  63.7, 1.848E+00
12, Mg Magnesium,  0.49373, 156.0, 1.740E+00
13, Al Aluminum,   0.48181, 166.0, 2.699E+00
14, Si Silicon,    0.49848, 173.0, 2.330E+00
22, Ti Titanium,   0.45948, 233.0, 4.540E+00
26, Fe Iron,       0.46556, 286.0, 7.874E+00
28, Ni Nickel,     0.47708, 311.0, 8.902E+00
29, Cu Copper,     0.45636, 322.0, 8.960E+00
30, Zn Zinc,       0.45879, 330.0, 7.133E+00
47, Ag Silver,     0.43572, 470.0, 1.050E+01
50, Sn Tin,        0.42120, 488.0, 7.310E+00
56, Ba Barium,     0.40779, 491.0, 3.500E+00
64, Gd Gadolinium, 0.40699, 591.0, 7.900E+00
74,  W Tungsten,   0.40250, 727.0, 1.930E+01
78, Pt Platinum,   0.39984, 790.0, 2.145E+01
79, Au Gold,       0.40108, 790.0, 1.932E+01
80, Hg Mercury,    0.39882, 800.0, 1.355E+01
82, Pb Lead,       0.39575, 823.0, 1.135E+01
83, Bi Bismuth,    0.39717, 823.0, 9.747E+00
92,  U Uranium,    0.38651, 890.0, 1.895E+01

Image processing

The image that results from the composite of the 1D sections has very low contrast. It is simple to expand the dynamic range of the image, but also note that the contrast is weighted towards the center. This is because the radial sections favor the center of the image. The center of the target has the most overlapping sections so the pixels near the center contribute more signal to the average. It's difficult to apply a uniform contrast enhancement over the entire image because the result will leave the edges too dark or the center too light. What is needed is contrast enhancement that will be weighted based on the distance from the center of the image.

A more complex example

target n.png target n out.png target n out enhanced.png

The real world of x-rays is not so simple. In the experiments above, I actually synthesize the radial sections by averaging all the pixels in the rows. This roughly approximates how an x-ray reveals average density of a line through the target. But in the real world there can be materials inside the target that are so dense that they totally block x-ray energy. This reconstruction technique assumes that every part of a target is at least somewhat transparent. If there are parts of a target that are totally opaque even to x-rays then this will result in ambiguous, hidden sections. These hidden sections not only hide what is inside of them, but they also cause shadows that distort areas outside.

The following target is similar to the one used before except that it now has a screen added. The algorithm that synthesizes the radial sections was modified to treat any red are as totally opaque. The result is that anything inside the cup shaped screen is totally hidden. The dense area also throws off the contrast so that it is difficult to see the notch at the top of the target, but you can more or less make it out. These artifacts are known as computed tomography streak artifacts. They are seen in human subjects with metal implants.

targeto.png targeto out.png

first reconstruction

I believe this was my first successful CT reconstruction. This is actually a cross-section of a piece of perforated ice (frozen water).

radon-reconstruction-first.png

A real example

Here are some CT scans of a muskrat skull.

lynx-scan.gif --> lynx-radon.gif --> lynx-ct-reconstructions.gif

This is my second successful reconstruction from a muskrat skull. This is pretty noisy, but you can tell it's an axial slice of a skull.

reconstruction 2.png

I was able to clean up the source radon images and regenerate a cleaner reconstruction. This is a slightly different depth, as well.

reconstruction 3.png

Here is an animated GIF of every fifth frame of the stack of CT reconstructions.

ct-sections.gif

cone beam reconstruction distortion

Here are some contrast enhanced views of reconstructions of a Lynx skull. Each of these reconstructions use the same dataset. The first is a reconstruction using only half the images centered at 60 degrees. The second is an average of 90 reconstructions at all angles. The third is a "minimum composite" of 90 reconstructions at all angles (sort of like the differences of all reconstructions).

Tomography deals with how you can take a set of horizontal projections of a target and use them to reconstruct what the target would look like from above. One easy method to calculate a tomographic reconstruction is to use a function known as the inverse Radon transform -- also known as filtered back-projection. Projections are just the shadows cast by a target between a light source and a screen. X-rays work nicely on humans because they go all the way through and don't refract. A cone-beam describes how a light bulb projects light. Most x-ray sources are pretty much like a light-bulb. A parallel-beam describes how a LASER beam projects light. The inverse Radon transform assumes that the set of projections you feed into it come a parallel-beam source. Luckily, we can cheat and feed cone-beam projections into the inverse Radon transform and it will still generate a reconstruction, but it will introduce annoying distortions. The purpose of the video was to illustrate the distortions you get by feeding cone-beam projections into the inverse Radon transform.

There are two types of distortion the cone-beam creates. First, there is perspective distortion. An object closer to the beam source will project a larger shadow than an object farther from the source. The second type of distortion is parallax distortion. Features appear to move up and down as the subject is rotated in the horizontal plane. This means that blurred features above and below the slice you want will end up in your reconstruction.

I have attached four images to help show what is going on. These are all reconstructions of the same slice. They all show the same target but with different distortions. These are frames from of the video, but I added Gaussian blur and enhanced the contrast.

Frame 1 shows a single reconstruction from a specific angle, and Frame 2 shows a single reconstruction of the same target from a different angle. If I had used parallel-beam projections then it should not matter what angle I chose to use in reconstructing the slice. Both Frame 1 and Frame 2 would be identical. The differences that appear are due to cone-beam distortions. Notice the streak on the left nose of Frame 1 that curves up. Compare that to the streak on the left nose of Frame 2 that curves down.

It turns out that from the projections I captured for this particular experiment I was able to reconstruct 90 different alternatives for the same slice. Each alternative reconstruction is similar to the others, but differs in the distortion it reveals. The video showed the stack of 90 alternatives at 10 frames per second in order to animate how the distortions change with the reconstruction angle.

So the video shows the 90 alternatives animated through time, but what we really want is a single still frame that shows the "true" slice. Frame 3 shows what you get if you simply average the 90 alternatives into a composite frame. It's better than any of the single frames, but it's still fuzzy. Frame 4 shows the composite using the minimum value of each pixel in the stack of 90 images. There are other ways to composite the stack of 90 images into a single still frame. I'm still working on the best method.

frames.png

cone-beam-enh-a60.png

cone-beam-enh-avg.png

cone-beam-enh-min.png

Source code

This is a rough draft of the source code written in Python. It requires the PIL module for image manipulation.

Here is a more sophisticated implementation cat-py.

My future efforts will probably use matplotlib.

Click here to download: cat_scanner.py <include src="/home/noahspurrier/noah.org/engineering/src/python/x-ray_cat_scan/cat_scanner.py" highlight="python" />

Linux Ubuntu Packages

The following packages can be useful when working with images.

apt-get -q -y install ctsim imagemagick aeskulap

misc

http://www.wise-uranium.org/calc.html

http://www.wise-uranium.org/rdcri.html

http://www.nukeworker.com/

http://www.sams-xrays.com/

cat-py

Miniature X-Ray Generator with Pyroelectric Crystal Heating and cooling of the pyroelectric crystal LiNbO3 causes it to emit electrons. When these strike a copper target the target will emit x-rays through bremsstrahlung emission. Radius Health is working on a more sophisticated device that uses the same principle.

Lohmann x-ray tubes - "German engineering" may be a cliché, but no other phrase comes to my mind after I held one of these x-ray tubes. I only wish their web site had more pictures.

J. R. Hird, C. G. Camara, and S. J. Putterman, A triboelectric x-ray source, Appl. Phys. Lett., 2011, 98 (13).

http://www.wikiradiography.com/

http://www.wise-uranium.org/calc.html

http://www.nukeworker.com/

http://www.rtstudents.com/

http://www.rtstudents.com/pacs/free-dicom-viewers.htm