Dependencies

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.

$ conda install -c astra-toolbox -c nvidia astra-toolbox
$ 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_CuPy and tomobar.methodsIR_CuPy. For example, the ultra-fast reconstruction method tomobar.methodsDIR_CuPy.RecToolsDIRCuPy.FOURIER_INV(), based on the Fourier transform [NIKITIN2017], is available in tomobar.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_CuPy modules, where more efficient iterative regularisation methods are implemented. Note, however, that modules in tomobar.methodsIR won’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
    1. 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)
  • 8. mpi4py is a Python extension for parallel computing using MPI. Install only if you are planning to use multi-GPU computing. ToMoBAR in itself doesn’t offer any parallelisation and you might want to check the HTTomo package. HTTomo supports MPI-based reconstruction and uses ToMoBAR as a backend.