Cone Beam CT imaging is a commonly used imaging solution for many medical applications. Vendors usually provide their own reconstruction software along their hardware, yet it is not always the case.
In this blog post, we will present how we integrated the Reconstruction Toolkit (RTK) library into 3D Slicer and how we developed a metal artifact reduction algorithm to the reconstruction process.
The RTK library
The RTK library is an open-source and cross-platform software for fast CT reconstruction. It is based on the Insight Toolkit (ITK) and provides the following features :
- Basic operators for reconstruction: filtering, forward, projection and backprojection
- Multithreaded CPU and GPU versions
- Tools for respiratory motion correction
- I/O for several scanners
- Preprocessing of raw data for scatter correction
The library is available in C++ as part of the ITK library as well as in Python.
RTK also provides command line interface applications for fast testing and implementation.
Integration with 3D Slicer
Because RTK and 3D Slicer are built upon ITK, the interface between both software are mostly compatible. To integrate RTK into 3D Slicer, there exists two possible solutions:
- Integrating RTK using Slicer’s command line interface (CLI) mechanism
- Integrating RTK as a Python module
For the project, we decided to use RTK through Slicer’s CLI mechanism. This solution provides the following advantages :
- RTK’s existing executables can be extended for specific constructor file formats
- CUDA compilation is independent of the available Python packages
- RTK’s library dependencies (including ITK) can be made independent of Slicer’s
In order to adapt an RTK executable to a Slicer CLI, the only challenge comes from interfacing the parameters. RTK current uses interfaces close to Slicer’s but with different library implementation. The CLIs were built using dual parameter specifications for both RTK and Slicer.
Cone beam CT reconstruction
RTK’s CBCT reconstruction is constituted of the following steps :
First, the projection images are loaded as a projection volume. The projection images are then converted from manufacturer formats to line integral format. This conversion is done by providing RTK with the pixel values associated air and water values.
Once the projection images are converted, the acquisition geometry per projection image is required.
The geometry is described in detail in RTK’s documentation and needs to be described projection by projection.
Once the geometry and the projection images defined, the rest of RTK’s pipeline consists in a series of filters and applying the FDK (Feldkamp, Davis and. Kress) reconstruction algorithm.
It can be noted that RTK also provides iterative reconstruction algorithms such as the SART (Simultaneous Algebraic Reconstruction Technique).
After the reconstruction algorithm, a few additional filters can be applied, including conversion from absorption/attenuation to Hounsfield Units, frame of reference conversion between RTK referential and RAS referential and field of view cropping.
Integrating CBCT reconstruction in 3D Slicer can be done in three separate steps :
- Loading of manufacturer volumes into 3D Slicer and conversion of the projection images to line integrals
- Reconstruction of the line integrals using FDK
- Post processing of the reconstructed volume
Metal Artifact Reduction
Metal artifacts are a common source of artifacts present in CT reconstructed volumes. They appear as dark and bright streaks and can degrade and decrease the diagnostic value of an examination.
There exist a multitude of metal artifact reduction algorithms. They usually consist of the following principles. First the area of distortion is identified in the reconstructed volume. This step consists in segmenting in the source volume the metal parts. Then these metal parts are forward projected in the projection stack.
The projected metal trace are then removed from the projection stack using interpolation or inpainting methods. The modified projection stack is then reconstructed using backprojection method to obtain the corrected volume.
This metal artifact reduction workflow can be nicely integrated in 3D Slicer.
The first step consists in segmenting the metal parts of the reconstructed volume. This step can be done using Slicer’s segment editor using thresholding methods combined with the scissors tool to remove any unnecessary parts.
The segmented metal part can be forward projected using RTK’s Joseph [Joseph, IEEE TMI, 1982] forward projection implementation.
The forward projected metal trace will then be used as a mask to interpolate the original projection images.
As the interpolated projection stack will be used to reconstruct the corrected volume, the interpolation step constitutes the most important step in the projection metal artifacts algorithms.
The simplest method of interpolation consists in doing a linear interpolation of the original projections in place of the projected metal trace. For this, we implemented an ITK filter implemented in CUDA using the ITKCudaCommon module.
Finally, the modified projection stack can be reconstructed using RTK’s FDK algorithm.
We have demonstrated the feasibility of interfacing RTK with Slicer as well as improving the reconstruction results (MAR technique). While this has not been made open-source this opens the door to many types of use cases that mix reconstruction, visualization and post-processing such as dental implant planning.
Shall you be interested in those capacities, please reach us out.
This work has been performed by Kitware Europe.
1 comment to CT reconstruction using Slicer and RTK
Interesting to see my own CBCT scan being used in this blog post!