NERS/BIOE 580
Lab06 - Object Module B

Purpose:

In this module we will examine the contrast of small structures in a radiographic image. A simple object consisting of human tissue with a small fluid region will be considered. The difference in the transmitted signal due to an iodinated solution versus water in the fluid space will be computed.

Discussion:

Because tissue material is comprised of low atomic number atoms, there are no absorption edges that will cause the transmitted spectrum to have discontinuities. However, it is common to add material to the body to selectively increase the attenuation of a particular region. Frequent use is made of solutions containing iodine which has an absorption edge at 33 keV. The perturbation of the transmitted x-ray spectrum produced by this material thus varies as a function of energy.

Pharmaceuticals having a number of iodine atoms attached to a biologically compatible organic molecule have been developed for use in medicine. This solution may be injected at high concentration into arteries, joints, or fluid spaces such as in the spine. Injections into a vein will mix with normal blood and concentrate in certain body tissues such as the kidney. Iodine contrast agents are used frequently to image these structures. We consider in this module a non-ionic iodine pharmaceutical.

Most radiographic detectors measure the absorbed energy deposited in the active elements of the detector. Thus, we will use the total energy fluence in the transmitted x-ray beam and assume an ideal energy integrating detector which absorbs all of the energy for each incident x-ray photon.


Task Obj-B1: Iodine solution.

A dilute contrast solution is defined in in $XSPECT_DIR/_materials/Icontrast_3mg. This material corresponds to a mixture of 100 ml of water and 1 ml of Iohexol-300. Iohexol is a nonionic contrast agent made by Nycomed Inc. and used frequently for medical applications including CT and angiography. Read the composition information in the 'Icontrast_3mg' file.

The small concentration of Iodine causes relatively high absorbtion of x-rays with energy just above the K edge. The difference can be seen by comparing the energy dependant transmission of a 1 cm thick later of Icontrast_3mg versus water. This can easily be done using the tcl procedures 'attenCoef ..' and 'diffx ..' that are loaded from the _tcl directory.

Make a copy of the LabHeader.tcl script saved in the previous lab and save it in a directory for Lab06 with an appropriate name, L06-Obj-B1.tcl. Add the following commands to create a plot of the transmission difference;

  • attenCoeff 10 100 1 {{water 1.0}}
  • file copy -force trans.dat trans-water.txt
  • attenCoeff 10 100 1 {{Icontrast_3mg 1.0}}
  • file copy -force trans.dat trans-Icontr.txt
  • diffx trans-water.txt trans-Icontr.txt
  • plotSpectra spectra-diff.tmp
  • file copy temp.png L06-Obj-B1.png
The arguments to the attenCoeff command (see .../_tcl/AttenCoeff.tsp) are the minumum energy, the maximum energy, the energy increment and a list of material layers. Each list element is a material layer list with two elements, the material and layer thickness in cm. The diffx procedure (see .../_tcl/diffx.tsp) was written to compute the difference between two x-ray spectra stored in the spectra.tmp format. The trans.dat file created by attenCoeff, which we have renamed, has a format similar to spectra.tmp and can be used in this situation. The diffx procedure creates a file named 'spectra-diff.tmp', In this case, the file is the transmission difference. Similarly, we use the plotSpectra file to plot the transmission difference although the vertical axis is not correctly labeled. The plotSpectra procedure used creates a file named 'temp.png' which is renamed in the last script command.

The transmission through the 1 cm water later is seen to be about 7% higher than through 1 cm of the dilute contrast solution in a narrow energy range just above the iodine K edge. For human subjects, the difference is actually that between normal blood and iodinated blood which is similar. To record images that show blood vessels with high image contrast, detectors with good detection efficiency in the region around 40 keV are needed.

Task Obj-B2: Tissue radiograph model.

Now make another copy of the LabHeader.tcl script saved in the previous lab and save it in your Lab06 directory as L06-Obj-B5.tcl. Revise this L06-Obj-B5.tcl script to compute the spectrum transmitted through an 11 cm tissue region and a 1cm water region. The script should use XSPECT procedures in the following manner;

  • spectGen
        - 70 kVp tungsten
  • atten
        -account for the following materials;
    • 0.3cm oil
    • 0.148 cm glass_pyrex
    • 0.25 cm added al_1100
  • atten
        -account for tissue and water separately;
    • 11 cm muscleNBS
    • 1 cm water
  • sr2cm
        -set the distance to 70 cm

The oil, glass, and added aluminum represent the materials normally found in the xray tube housing as we saw in previous modules. Verify that the script is working by temporarily using 'plotSpectra spectra.tmp' to plot the x-ray spectra produced.

Task Obj-B3: Energy fluence.

To date, we have observed x-ray spectra in units of photons per steradian or per cm^2. These spectra can easily be changed to energy fluence by multiplying each value by the energy for that value. Read the documentation file for no2erg. in $XSPECT_DIR/_xspect3.5/_doc. Add the 'no2erg' command at the end of the L06-Obj-B5.tcl script after the sr2cm command. Execute the script and view the spectra.tmp file to observe the change in the unit code and the change in the table headings.

Note: We have put the sr2cm and no2erg at the end of this script. It could also be put after spect_gen; however, there is currently an underflow bug in atten which produces inconvenient error messages due to the very small values encountered with ergs/cm^2 at distances such as 70 cm.

Task Obj-B4: Iodine contrast versus energy.

For an ideal detector, the recorded signal will be proportional to the total energy fluence in the xray beam. Since the xray spectra in this model is now in units of ergs/mAs-cm^2-keV, the integral of this spectrum over xray energy (keV) will give the total energy fluence in ergs/mas-cm^2. The program called int_spect will perform this function (in $XSPECT_DIR/_xspect3.5/_bin) . Read the documentation for int_spect.

As we did above, run the L06-Obj-B.tcl procedure with the current model and, using the command window, enter the 'intSpect' command which is loaded as an XSPECT procedure. This will return the total energy fluence. Then add a command at the end of the L06-Obj-B.tcl script to capture the total energy fluence through the object.

set fluenceWater [lindex [intSpect] 0]
Also add a command to copy the current spectrum to a file with a name such as 'spectraWater.tmp'

We now want to enter exactly the same commands again but with 1 cm of Icontrast_3mg instead of 1 cm of water in the atten command. Change the variable name for the total fluence to 'fluenceIcontr' and the copy of the current spectra to 'spectraIcontr.tmp' This can be done by copying the commands for the full model starting with spectra generation, pasting at the end of the script, and modifiying as instructed. A somewhat more compact script would copy the spectrum after muscle attenuation then copy this back to apply the iodine contrast.

If you plot the iodine spectrum ('plotSpectrum spectraIcontr.tmp') you will see a slight reduction just above the iodine K absorbtion edge at 33 keV. The difference in the energy fluence spectrum with water versus the iodine solution can then be effectively illustrated using 'diffx ..';

  • diffx spectraWater.tmp spectraIcontr.tmp
  • plotSpectra spectra-diff.tmp
Finally compute the relative contrast for an ideal detector using
  • set Cr [expr ($fluenceIcontr-$fluenceWater)/$fluenceWater]
  • puts "Cr = $Cr"

Task Obj-B5: Labeled plot with three spectra.

In the prior two tasks of this lab module there were three x-ray spectra saved:

  • spectraWater.tmp - A 100 kVp spectra through 11 cn muscle and 1 cm water.
  • spectraIcontr.tmp - The above spectra with a contrast solution replacing the water.
  • spectra-diff.tmp     - The difference between the water and contrast spectra.
Plot these three spectra on one graph, L06-Obj-B5.png, with the relative contrast as a label. The can be done by creating a gnuplot file, Lab06-Obj.gpl, as was done in Lab03 with commands to output a png file. These commands can be used to create a gnuplot script that will plot the three graphs with the contrast value as a label:
  • set fileID [open Lab06.gpl w]
  • puts $fileID "# Plot of the spectral difference."
  • puts $fileID "set label \"Cr = $Cr\" at graph .1,.9"
  • puts $fileID {
  •     set xlabel "keV"
  •     set ylabel "ergs/mAs-cm2-keV"
  •     set key left center
  •     plot "spectraIcontr.tmp" w l, \
  •           "spectraWater.tmp" w l, \
  •           "spectra-diff.tmp" w l
  •     pause -1
  •     set terminal png font arial 14 size 900,600
  •     set output "L06-Obj-B5.png"
  •     replot
  • }
The preferred way to generate a gnuplot file that was introduced in Lab03 is to put the gnuplot commands in a 'puts $fileID { ... }' expression. However, the quotes in the gnuplot commands are not interpreted within the { ... } brackets. In order to evaluate the value of the Cr variable, $Cr, the above puts the 'set label ..' command at the top in a separate 'puts $fileID ..' command where a backslash is used before the quotes as an escape character which indicates that the quote is to be written and is not a tcl text field delimiter. Also note the backslash at the end of the plot statement which indicates that the return character should be ignored and the tcl command continues on the next line.

Alternatively, just use the plotSpectra procedure that is sourced as plotSpectra.tsp with the three spectra as a list argument:

  • ...
  • plotSpectra {spectraWater.tmp spectraIcontr.tmp spectra-diff.tmp}
  • ...
Then rename the temp.gpl file that is generated as Lab06-Obj.gpl and add the 'set label ..' command using a text editor.

Comment:

Clearly the energy spectrum plays an important role in producing contrast from certain materials. If the xray energy spectrum has its major components below the K edge of the contrast material the effect will be markedly less than if the energy spectrum is predominantly above the K edge. A similar dependence on energy results from the absorption dependence of the detector.


Lab06 Results:

For this module, please turn in the script used for the sections of this lab and three plots;

  • L06-Obj-B1.tcl : tcl script for task B1 of this lab.
  • L06-Obj-B1.png : differential transmission plot.
  • L06-Obj-B5.tcl : tcl script for tasks B2 to B5 of this lab.
  • L06-Obj-B5.png : Plot with three spectra and a label for relative contrast.
  • L06-Obj-B5.gpl : The gnuplot command file for the above plot.

L06_Obj-B1 Reference script: Lab06_Obj-B1
L06_Obj-B5 Reference script: Lab06_Obj-B5

Next:

The next module is 07-Detector-A-prt.