Welcome to CIL’s documentation!#
The aim of this package is to enable rapid prototyping of optimisation-based reconstruction problems, i.e. defining and solving different optimization problems to enforce different properties on the reconstructed image, while being powerful enough to be employed on real scale problems.
Firstly, it provides a framework to handle acquisition and reconstruction data and metadata; it also provides a basic input/output package to read data from different sources, e.g. Nikon X-Radia, NeXus.
Secondly, it provides an object-oriented framework for defining mathematical operators and functions as well a collection of useful example operators and functions. Both smooth and non-smooth functions can be used.
Further, it provides a number of high-level generic implementations of optimisation algorithms to solve generically formulated optimisation problems constructed from operator and function objects.
Demos and Examples#
A number of demos can be found in the CIL-Demos repository.
For detailed information refer to our articles and the repositories with the code to reproduce the article’s results.
Cite this work#
If you use this software please consider citing one or both of the articles below.
1. Jørgensen JS et al. 2021 Core Imaging Library Part I: a versatile python framework for tomographic imaging https://doi.org/10.1098/rsta.2020.0192 . Phil. Trans. R. Soc. A 20200192. The code to reproduce the article results. https://github.com/TomographicImaging/Paper-2021-RSTA-CIL-Part-I
2. Papoutsellis E et al. 2021 Core Imaging Library - Part II: multichannel reconstruction for dynamic and spectral tomography https://doi.org/10.1098/rsta.2020.0193 Phil. Trans. R. Soc. A 20200193. The code to reproduce the article results. https://github.com/TomographicImaging/Paper-2021-RSTA-CIL-Part-II
Table of Contents#
- Introduction
- Framework
- Read/ write AcquisitionData and ImageData
- Optimisation framework
- Algorithms (Deterministic)
- Algorithms (Stochastic)
- Operators
- Functions
- Base classes
- Simple functions
- Composition of operator and a function
- Indicator box
- KullbackLeibler
- L1 Norm
- L2 Norm Squared
- Least Squares
- L1 Sparsity
- Mixed L21 norm
- Smooth Mixed L21 norm
- Mixed L11 norm
- Total variation
- Function of Absolute Value
- Approximate Gradient base class
- Stochastic Gradient function
- SAG function
- SAGA function
- Stochastic Variance Reduced Gradient Function
- Loopless Stochastic Variance Reduced Gradient Function
- Utilities
- Block Framework
- Processors
- Recon
- Utilities
- CIL Plugins
- Developers’ Guide
- Tutorials
- User showcase
- Multibang Regularisation in CIL
- Showcase of the algorithms for deblurring and denoising
- 1D inverse problem demo using deriv2 from regtools
- TV-regularized reconstruction of the dynamix STEMPO dataset in CIL
- Dynamic MR Reconstruction
- a data reader for CIL
- Aims of this session
- Main steps
- Create directories
- Import packages
- Step 1. Download and extract the phantom data from a ZIP file.
- Step 2. Extract surface meshes from the voxelied phantom.
- Step 3. Simulate an X-ray radiograph of the virtual patient.
- Step 4. Select the number of incident photons per pixel
- Step 5. Add the corresponding amount of Photonic noise
- Step 6. Create the flat-field images with the corresponding amount of Photonic noise.
- Step 7. Simulate a CT scan
- Step 8. Reconstruct the CT volume using the Core Imaging Library (CIL)
- Cleaning up
- Reconstruction and regularisation for a hyperspectral dataset
- Tested on CIL version 23.1.0
- Define the scan geometry
- TV regularisation in space
- TV regularisation across both energy channels and spatial dimensions
- TV regularisation in spatial dimensions and Tikhonov regularisation across the energy channels
- Summary - Comparison of Reconstruction by each algorithm
- Comparison between the Least Square and the Weighted Least Square and the Kullback Leibler Divergence
- CIL version 23.1.0
- The dataset
- Reconstruct the noisy data using FBP
- Reconstructing the noisy data using least squares (LS)
- Reconstructing the noisy data using weighted least squares (WLS)
- Reconstruct the noisy data using Kullback Liebler (KL) divergence
- Comparisons without regularisation
- Reconstructing the noisy data using least squares with Total Variation regualrisation
- Reconstructing the noisy data using least squares with Total Variation regualrisation
- Reconstructing the noisy data using KL divergence with TV regularisation
- Compare all the reconstructions
- Comparisons between LS, WLS and KL loss for a range of counts
- Offset reconstruction
- Introduction
- Set variables and paths
- Create acquisition geometry
- Read files
- Data processing
- Prepare back-projection
- Review projection data before running the recontruction
- Perform reconstruction
- Display results
- Optional: Save results as tiff files
- Optional: Save results as json files
- Exciscope Polaris phase contrast reconstruction with CIL
- Controlled Wavelet Sparsity using callbacks (2D data)
- Wavelet based regularization
- Controlled Wavelet Sparsity using callbacks (3D data)
- Wavelet based regularization
- CIL User Showcase 13: Anisotropic Regularization for FILD Measurements using CIL
- Simulation using gVXR and CPU reconstruction using CIL of a twisted hexagonal object with helical flow channels
- Read projections
- Reconstruction
- Conclusion
- Memory and Performance Profiling CIL Algorithms: CGLS vs. LSQR
- Loading The Sandstone Dataset
- Ground Truth - FBP Reconstruction of pre-processed sandstone
- Generating Test Sinogram - Apply Noise:
- CGLS and LSQR without regularisation
- Memory Profiling
- Tikhonov regularisation using CGLS and LSQR - with or without a block
- Memory costs for LSQR+Block, CGLS+Block and LSQR+Tikhonov
- Conclusion:
- A CIL-pytorch example using DeepInverse using a pre-trained denoiser in the CIL FISTA algorithm
Contacts#
Please refer to the main CCPi website for up-to-date information.
The CIL developers may be contacted:
by joining the devel mailing list
on the CIL’s GitHub repository page https://github.com/TomographicImaging/CIL or
on the CIL Discord channel https://discord.gg/9NTWu9MEGq