Cone-beam backprojection tool >>>> WARNING: very poor translation!!! <<<<
Since college course "Analysis of Signals and Images" I've been interested into backprojection. That is algorithm for reconstruction of 2D sample slice from set of its 1D projections (for example from x-ray projections taken from several angles). It worked quite well for single slice case but I was curious if the method can be extended for direct reconstruction of 3D volume model from 2D projections (later I've find out this case is called cone-beam backprojection). Recently I found some 3D x-ray videos on youtube and these seemed to me like ideal data source for following experiment. I started writting my reconstruction program in Matlab but it was "a bit" slow so I switched to C/C++. After successful implementation of both ray and voxel driven cone-beam backprojection algorithms I decided to implement my own raycaster for 3D volume viewing because use of 3D Slicer is often quite annoying. 3D Slicer is powerfull tool but it has certain bugs and also my video card is not supported (it's a bit too slow in CPU mode). 1. Some theory first Backprojection is very simple method. It's basically summing of 1D projections taken from different angles into resulting 2D image (slice). To make the result sharp, it's necessary to prefilter the projections with kind of highpass filter (that is why it is called filtered backprojection). Filter also eliminates bias (mean intensity of the projection). Graphical demonstration of this basic case for parallel beams is shown on fig. 1.1, some more details in [2].
If 3D model is required then it's necessary to repeat the process for different axial positions of the sample in the scanning gantry.
Then the particular slices are combined into 3D volume that can be viewed in volume raycasting software like for instance 3D Slicer.
The process of reconstruction is similar in this case: Virtual detector and focus point is placed and oriented in 3D space exactly as they were during scanning and
the 2D projection image is then "stretched" (interpolated) to the focal point as shown on fig. 1.2. The fraction of the spire that intersects reconstruction area (cube in this case)
is added to it. The process is then repeated with every available projection. 2. Description and usage of the tool My backprojection tool is able to load set of projection images defined by project INI file, do the filtering, backprojection and volume raycasting. The INI file also defines geometry of the scene, filters, viewer setup and several other things, details are described in following paragraphs.
The program is made in BDS 2006 Turbo C++ and tested in Windoze XP/7. It has been built as 32-bit multithreaded application
so it should work in both 32 and 64-bit systems.
The reconstruction needs quite a lot of CPU power so it'll have reasonable performance only on modern PC's with multicore CPU and fast memory.
It was designed and tested on Intel i5 3450 (4 cores/4 threads) with 1600MHz DDR3 memory.
Every operation that might take significant amount of time is distributed into several threads.
Threads count is defaultly set according to the machine but can be decreased in the menu. 2.1 License
It's freeware tool so you can use it for any purposes but without any warranty for its proper function.
You are not allowed to redistribute the tool without help files (content of the help folder)!
Author is not responsible for any possible dammages caused by this tool.
If you don't agree with these terms don't use this tool. 2.2 Creating new setup INI file
If you want to create new setup (new set of projection images), just copy template INI file somewhere (or load the template and save with different name)
and edit [PATH] section. There are only two keys: 2.3 Scene geometry setup First thing to configurate for new setup is scene geometry. Figure 2.2 shows meaning of the parameters. Red cube in center represents destination voxel volume.
Detector center offsets du and dv are relative to its dimensions in range ±0.5. Detector height is calculated from width and aspect ratio of projection image. Any changes are applied by Enter key or Refresh button. 2.4 Filter setup In this section you can setup projection images filters. First applied filter is treshold and saturation in range 0 to 255. This helps to eliminate some noise. Then windowing function can be applied to smooth edges of the images. Last filter is main backprojection filter with defined profile. Usually only u-axis filtering is used but you can enable v-axis filtering too. Default settings (cosine filter): f=1.0 and s=1.0. Filtered results are normalized to defined level (usually 1024). If "common" mode is chosen all projections are taken as one image, then normalized and split again. If "individual" mode is chosen projection images are normalized individually. Later option migh be useful for unstable exposition of the projections. Any changes are applied by Enter key. This will process all filtering with new setup and then reconstruction process. 2.5 Voxel volume
Here you can set voxel volume resolution N in range 64 up to 400. Decimation throws out some projections to speed up reconstruction.
It can be useful for experimental geometry tuning. Mode option switches between ray driven and voxel driven mode. Ray driven mode is usually faster but multisampling is required
for reasonable output quality. Voxel driven mode is intended for final reconstruction. Optionally linear resampling can be enabled. This might be usefull for low resolution
projections. 2.6 Slice viewer Here you set slice orientation in reconstructed volume and its postfilter (treshold and gamma correction). Escape key resets focused slider to its default value. Double click to slice image can be used for image export in BMP format. 2.7 Projections viewer Button View Projections enables projection images viewer. You can inspect original and filtered version of the projection images.
2.8 Volume raycaster
To eliminate need of 3D Slicer I've implemented my own volume raycaster. It's ray driven raycaster without interpolation and it implements only basic
methods but it's definitely more effective to use than exporting and loading the volume into 3D Slicer everytime some configuration is changed.
There are several tabs with setup and are organized in order as they are used during raycasting process. First thing
to setup is prefilter. Treshold and cutoff limit can be set. Treshold should be set to eliminate reconstruction noise around sample object.
Voxels with value exceeding cutoff limit are replaced with zeros (black).
Last tab is used to setup post-filter. You can set gamma correction and saturation level. Fixed check box disables automatic white level control (manual white level). Additionally you can invert image. 3. Sample data sets Here you can donwload a few exported projection data sets with already cofigured geometry:
4. Sources I was a bit lazy to draw all images needed for this article so I used some from following sources:
As I mentioned I'm using 3D x-ray videos from youtube as source data. There are several authors of these:
Source video example [5]: (c) 2013-2018, Stanislav Maslan - All rights reserved.
|