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
2. CCPi-Regularisation-Toolkit [KAZ2019] provides CPU and GPU regularisers (2D/3D) to enable Regularised iterative reconstruction in ToMoBAR. Once installed, one gets an access to more than 10 plug-and-play regularisers to compliment ToMoBAR’s iterative reconstruction algorithms.
For Python installation, see conda-httomo and conda-ccpi pages.
$ conda install ccpi::ccpi-regulariser # linux/windows (in case if above doesn't work)
$ conda install httomo::ccpi-regulariser # linux/windows
Note
For faster device-to-device regularised iterative reconstruction, consider using the CuPy-based version of ToMoBAR (see point 3).
3. 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
4. CuPy-enabled CCPi-Regularisation-Toolkit can be used when point 3 is satisfied. This will give you an access to
tomobar.methodsIR_CuPymodules, where more efficient iterative regularisation methods are implemented. Note, however, that modules intomobar.methodsIRwon’t be accessible without installation of CCPi-Regularisation-Toolkit (see point 2).5. 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
7. Wavelet toolbox pypwt or pycudwt is optional and required only if the CCPi-Regularisation-Toolkit already installed. It adds soft/hard thresholding of Wavelets coefficients to the available regularisers. In some cases it can be beneficial for the reconstruction quality.
For Python installation one can try:
$ pip install pycudwt
$ conda install httomo::pypwt # if above didn't work (linux only)