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 major dependency as ToMoBAR heavily relies on the GPU-accelerated projection/backprojection routines of the toolbox. With the package installed, one can perform Direct reconstruction and Basic iterative reconstruction, however, the regularisation will not be available for Regularised iterative reconstruction.
Normally ASTRA included into the list of dependencies, but one can install it with:
$ 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
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
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
andtomobar.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
6. CuPy-enabled CCPi-Regularisation-Toolkit can be used when (5) is satisfied. This will give you an access to
tomobar.methodsDIR_CuPy
andtomobar.methodsIR_CuPy
modules, while regularisation methods oftomobar.methodsIR
won’t be accessible.
$ pip install ccpi-regularisation-cupy # all OS but CuPy modules only