Dependencies#
ToMoBAR relies on several dependencies which we list bellow in the order of priority. In general, we would recommend installing 1,2 and 3 packages.
1. ASTRA-toolbox is the important dependency as ToMoBAR relies on the GPU-accelerated projection/backprojection routines of the toolbox. With the package installed, one can perform Direct reconstruction and Basic iterative reconstruction, note that for regularised iterative methods you either need CCPi-Regularisation-Toolkit [KAZ2019] or a CuPy installation, see bellow for more details.
Normally ASTRA Toolbox is included into the list of dependencies of ToMoBAR, but one can install it with:
$ conda install -c astra-toolbox -c nvidia astra-toolbox
Note
For faster device-to-device regularised iterative reconstruction, consider using the CuPy-based version of ToMoBAR (see point 3).
2. CuPy dependency provides access to GPU-accelerated routines that are separate from the main host-device-host implementation approach. The CuPy-driven algorithms operate on CuPy arrays that remain on the GPU, rather than on NumPy arrays stored in CPU memory. When the CuPy dependency is available, users can access methods from the following classes:
tomobar.methodsDIR_CuPyandtomobar.methodsIR_CuPy. For example, the ultra-fast reconstruction methodtomobar.methodsDIR_CuPy.RecToolsDIRCuPy.FOURIER_INV(), based on the Fourier transform [NIKITIN2017], is available intomobar.methodsDIR_CuPy. In addition, faster regularised iterative reconstruction methods are also provided (see point 4). We plan to continue developing and supporting this capability, as it offers significant efficiency gains f or GPU-based computations without requiring explicit software builds.For Python installation see conda-cupy page.
$ conda install conda-forge::cupy
3. TomoPhantom is optional but can be very handy to generate synthethic tomographic data and play with Synthethic data reconstruction. Also most of the Demos in ToMoBAR using TomoPhantom.
For Python installation see the installation guide.
$ conda install httomo::tomophantom # linux/windows
HTTomolibGPU is a library of GPU accelerated methods for tomography which uses ToMoBAR as a backend for reconstruction. This library can be useful if one builds the full pipeline for raw data processing, including pre-processing, reconstruction and post-processing.
$ pip install httomolibgpu