X-ray Source
This tutorial explains aRTist’s spectrum calculator and how the source intensity and spot size are set up. We will build a pinhole camera to investigate the modelling of the focal spot.
Note
We continue with the project from the last tutorial. You can download it here if you need the current state:
tutorial_ctscan.aRTist
(4.6 MB)
Source Parameter Panel
Note
Open the Source tab in the Parameter Panel.
The Source section of the Parameter Panel (Fig. 94) displays the current configuration of the X-ray source and provides configuration tools.
In the upper part of the panel, the current spectrum of the X-ray source is plotted. At the moment, a monochromatic photon energy of 150 keV is simulated.
Spectrum Calculator
The Spectrum Calculator can be used to generate a spectrum for a given X-ray source configuration. It uses a model by Andreas Deresch et al.: [4]
Note
Click the button Calculate X-ray tube spectrum to open the Spectrum Calculator (Fig. 95).
Let’s generate a spectrum for a common X-ray tube that accelerates electrons onto a target. We will have to switch the Spectrum Calculator window from the current monochromatic mode to a general X-ray tube and enter some parameters (Fig. 96).
Note
For Tube select
General
. You will get more options to specify the tube (Fig. 96).Select Show principle in the bottom of the window to display a schematic drawing that illustrates the geometrical parameters.
For voltage (kV) enter
130
.For resolution (keV) enter
1.0
.For filter material select a
Cu
filter.For filter thickness enter
0.2
mm.Make sure Transmission is not checked. We will simulate a reflection target.
For target material select
W
.The target thickness does not matter for a reflection target: you can leave it at
1
mm.For both angles, enter
45
degrees.For window material select
Al
.For window thickness enter
2
mm.
If you want, you can save your tube parameters as a template for future projects. To do this, you can enter a name, and limits for a maximum voltage, current and power. Using the button Add tube definition to database you can save this tube and later select it from the Tube drop-down menu, as another entry among Mono
and General
.
The target thickness does not affect tubes with a reflection target, like the one we have modelled now. However, it is an important parameter for tubes with a transmission target. When you select Transmission, the image of the tube schematics will change and illustrate the parameters for a transmission tube.
Once the computation is done, the new spectrum will appear in the spectrum viewer (Fig. 97).
Note
Close the Spectrum Calculator window. We will not need it anymore.
Each bin of the spectrum will have a width of 1 keV, because that is the resolution that we chose before calculating the spectrum. To keep the simulation time at a bearable level, it is recommended not to exceed 128 spectrum bins. The Spectrum Calculator will ask if you want to reduce the spectrum when you go to higher voltages. The reduction process will remove bins in areas of the spectrum that are mostly flat (i.e. have the smallest slope). This method keeps distinct features like the peaks of characteristic radiation, and only removes information in areas where it shouldn’t hurt.
Flux Units
Spectra generated with the Spectrum Calculator represent the number of photons per energy bin that pass through an area of 1 m² at a distance of 1 m away from the X-ray source (Fig. 98).
aRTist simulates an isotropic source that emits photons uniformly in all directions, but the flux per energy bin that the Spectrum Calculator generates is expressed as the number of photons through a solid angle Ω of 1 sr.
Additionally, the number of photons is given for a certain time interval (1 s) and a certain source current (1 mA). For X-ray tubes that accelerate electrons onto a target, the unit of the spectrum is therefore:
Exposure & Primary Intensities
The intensity of the X-ray source can be tuned with the Exposure parameter (Fig. 99). For an acceleration tube like the one we just defined, you can enter a value for the electron current in mA.
Currently, changing this value does not affect the projection image because the current detector automatically adjusts its exposure time to reach 50000 grey values at the intensity maximum (Fig. 100). The detector settings will be treated in a later tutorial.
However, you will already see an effect on the primary intensities at the detector.
Note
In the upper left corner of the preview window, select primary intensities from the drop-down menu to switch the display mode (Fig. 101).
The image of primary intensities gives the intensity of the incident radiation at the detector (Fig. 102). It is measured in units of
The primary intensity is not affected by the detector’s integration time, but it depends on the source intensity (i.e. its current in mA). The primary intensities at the pixels are later converted into grey values through the underlying detector model, which can also take the spectral sensitivity (e.g. of a scintillator screen) into account. We will learn how to set up the detector characteristics in a later tutorial.
Warning
When saving a primary intensity image, make sure to select Float Image for the data type because the primary intensities are floating point numbers.
Spectrum Files
Spectra can be imported into aRTist from an external file and they can also be saved. They are stored in .xrs
files. Those are ASCII-coded and can be opened in a text editor. Their structure is relatively simple: they feature two columns separated by tab characters. The first column contains the energy (in kV) of the energy bins, the second column contains the number of photons for each bin. Further information can be added to such files in the form of comments. Commented lines start with a #
character. Certain comments can be understood by aRTist to display further information about the spectrum in the GUI, but it is not necessary to include them.
If you want to know more about spectrum files, start exploring them on your own: save the current spectrum with the Save button and open it in a text editor. Consequently, you can load a spectrum file with the Load button.
In the file for the spectrum that we have generated, you will find three blocks that list information from the spectrum generator. The first block lists the properties of the radiation right after its generation at the source target, the second block for the radiation after the tube window, and the third block after the X-ray filter. The Avg
states the average photon energy (in keV) after the current filter step, the Flux
gives the total number of photons, i.e. the sum over all energy bins. Note that the flux information for the fully filtered spectrum is usually found at the very end of the file.
Spectrum Picker
Objects in the path of the beam attenuate radiation: the result is an attenuation image on the detector. Apart from the material properties and their thickness, the absorption probability for a photon also depends on its energy. Usually, photons of lower energies have higher absorption probabilities than photons of higher energies. This means that the spectrum measured at the detector is usually shifted towards higher energies, because lower energies tend to be absorbed more often. This effect is called beam hardening.
You can get the spectrum (and therefore the photon flux) at a certain point of the projection image with the Spectrum Picker.
Note
Below the diagram of the spectrum, click on the button Show attenuated spectrum for picked position to open the Spectrum Picker (Fig. 103).
The incident spectrum (i.e. the free beam when it leaves the source after the last filter step) and the attenuated spectrum are currently the same because we have not yet picked a reference point on the projection image.
Note
In the Spectrum Picker window, click on the button Pick image position to calculate attenuation for.
The Image Viewer will now display a message in red: Picking spectrum reference position (Fig. 104).
Note
Click on a point in the image for which you want to get the attenuated spectrum.
The attenuated spectrum will be displayed in blue, next to the incident (original) spectrum in black (Fig. 105).
When you switch to the Text view, you can get further information, for example the path lengths that the ray travelled through each material to reach the chosen point on the detector (Fig. 106). The spectral information is now arranged in three tab-separated columns: the energy of the bin (keV), and the photon counts for the incident (original) and attenuated spectrum.
Of course, you can also save the current data using the Save button in the Spectrum Picker.
Note
Close the Spectrum Picker.
Focal Spot
Until this point, we have simulated an ideal point source. aRTist also offers an approach to simulate a spatially extended focal spot profile. To understand what is happening, we will build a simple pinhole camera to project an image of the focal spot onto the detector. Then, we will start exploring the settings that aRTist has to offer.
Pinhole Camera
Note
Turn off the visibility of the Support Cylinder, the Rotor and the Air Pocket (Fig. 107).
Using the Solids generator, we will now set up a plate of a highly absorbing material and poke a small hole at its centre.
Note
- Create a cuboid with the following dimensions (Fig. 108)
X = 100 mm
Y = 100 mm
Z = 0.1 mm
Press the Create button.
Note
- Create a cylinder with the following dimensions (Fig. 109)
X = 0.05 mm
Y = 0.20 mm
Z = 0.05 mm
Press the Create button.
Close the Solids module window.
We’ll rename the two generated parts to make it nicer, and set the cover’s material to a highly absorbing platinum, whereas the hole needs to be filled with air, our environment material. Also, the pinhole cylinder does not have the correct orientation yet: we need to rotate it to point in the direction of the beam. We will then position our pinhole very close in front of the source to reach a high magnification of the focal spot.
Note
Rename the
cuboid
toCover
.Rename the
cylinder
toPinhole
.Rotate the Pinhole by 90 degrees around the world’s X axis: enter
90
for its X Orientation.Set the Cover’s material to Pt and its Z Position to
485
.Set the Pinhole’s material to air and its Z Position to
485
.
You should now have a setup as displayed in Fig. 110.
Spot Size & Spot Type
To simulate X-ray spots, aRTist’s approach is to place several point sources in the rectangular 2D source region. In the Focal spot settings group of the Source, you can set the Size [mm] of this rectangular region. The number of point sources can be set under Spot type. If you set a single integer, the point sources will be distributed in a random pattern, but optimized such that points are not too close to each other (Poisson Disc Sampling). You can also choose a regular grid by entering two integers separated by an x
.
You can either choose pre-defined spot types from the drop-down menu, or enter your own numbers and grid sizes.
The simulation will be closer to reality with more point sources, but the simulation time will increase proportionally.
Note
Go to the Source parameter panel.
Enter a spot size of
1.5
mm in X and Y direction.For Spot type, enter
4x4
(Fig. 111).
Once the full simulation is complete, you should see an image of the magnified focal spot in the Image Viewer: a regular grid pattern of 16 individual point sources (Fig. 112).
Note
For the Spot type, enter 20
(Fig. 113) and press the Run button again.
You will now see a Poisson Disc pattern of 20 individual point sources in the Image Viewer (Fig. 114).
Each of these point sources has the same intensity: the total photon flux given by the current and spectrum is divided up evenly among each of the points. In the next section, we will learn how to set up intensity profiles for the focal spot.
Spot Intensity Profile
aRTist offers a simple way to generate two-dimensional Gaussian or Lorentzian intensity profiles for the focal spot. In the following example, we will create a purely Gaussian spot which has a circular symmetry: its width and height will be equal. Feel free to experiment with different parameters.
Note
Click the button Create a spot profile image. A window will appear that lets you enter the profile parameters (Fig. 115).
Width:
1.5
Height:
1.5
Fraction:
0.0
Resolution:
301
Click the Set button (the following calculation may take a few seconds).
The parameters that you can enter here are for a Pseudo-Voigt profile, V(r), a linear combination of a Gaussian distribution G(r) and a Lorentzian distribution L(r), weighted by the Lorentz fraction η.
The normalized Gaussian distribution is given by
with the width w, which is the parameter that you entered for the width (or height). For a Gaussian distribution, this is the half width at half maximum, or:
The Lorentzian distribution is given by
aRTist generates a square image for a symmetric intensity profile. If the width and height (in mm) are not equal, the spot profile image will be stretched to cover the rectangular source region.
In general, aRTist will set up the size of the source rectangle such that its physical width and height are a factor of three higher than the ones you entered. This means that it covers 1.5 times the FWHM; the rest of the distribution is cut off. If you need a different source spot alignment, you can rotate the source object with the Transform tools in the Setup tab.
Note
Close the Focal Spot Profile Generator window. Press the button Show spot profile image. The profile we just generated will appear in the Image Viewer (Fig. 116).
The spot profile image has a size of 301×301 pixels: this is the resolution we requested. It is an odd number such that the central pixel contains the intensity maximum.
The Image Viewer now shows how the 20 single point sources are distributed on the intensity profile (higher intensities are more likely) and how their individual intensity is weighted (Fig. 117).
You can also load spot profiles from external grey value images using the button Load spot profile image from file. Externally loaded spot image files will be placed onto the source in the same way as our generated profile image: it will be stretched to completely fill the source rectangle. The aspect ratio can be adjusted with the physical size (in mm) that you set for the source/focal spot in aRTist.
Summary
In this tutorial, you have learned how to set up aRTist’s virtual X-ray tube.
You learned how to generate a spectrum using the Spectrum Calculator.
You saw how
.xrs
spectrum files are structured and how to import your own spectra.You have used the Spectrum Picker to get the spectrum after attenuation.
You learned how aRTist simulates spatially extended spots using multiple point sources arranged in grids or smart patterns.
You know how to apply an intensity profile for the focal spot and how aRTist uses it to distribute the point sources and their intensities according to the given intensity map.
tutorial_xray_source.aRTist
(4.7 MB)