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 conda-forge::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. It is recommended to install using the httomo channel first as this combination is normally tested by the ToMoBAR’s author:

$ conda install httomo::ccpi-regulariser #  linux/windows
$ conda install httomo::ccpi-regularisation-cupy # all OS but CuPy modules only
$ conda install ccpi::ccpi-regulariser # linux/windows (in case if above doesn't work)

If one needs to install only CuPy modules (see 6.), the quickest way will be

$ pip install ccpi-regularisation-cupy # all OS but CuPy modules only
$ conda install httomo::tomophantom # linux/windows
  • 4. 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)
  • 5. CuPy dependency is optional and used to write high-level code in Python for GPU computations. Those algorithms operating on CuPy arrays that are kept on the GPU device as opposed to Numpy arrays kept in the CPU memory. It is a work in progress to fully support the CuPy compute in ToMoBAR, however, some reconstruction methods, such as direct and iterative were already ported, see tomobar.methodsDIR_CuPy and tomobar.methodsIR_CuPy, respectively. We have plans to continue developing and supporting this new capability as it offers promising efficiency for GPU computations, no OS-specific builds required, and simplicity of the implementation.

    For Python installation see the conda-cupy page.

$ conda install conda-forge::cupy # linux/windows
$ pip install ccpi-regularisation-cupy # all OS but CuPy modules only
  • 7. 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.