Package: corrct
PyCorrectedEmissionCT (corrct)Physically corrected projectors for X-ray induced emission CT.
PyCorrectedEmissionCT is usually abbreviated to its python module name:corrct(either pronounced "corr-C-T" or "correct").This package provides the following functionality:Support forattenuation correctionof the forward-projection and back-projection.Various solvers (reconstruction algorithms):Simultaneous Iterative Reconstruction Technique (SIRT).Maximum Likelihood Estimation Maximisation (MLEM).Simultaneous Algebraic Reconstruction Technique (SART).Primal-dual optimization from Chambolle-Pock (Primal-Dual Hybrid Gradient -PDHG), with:Various data fitting terms, includingGaussian and Poisson noisemodelling.Various optional regularization terms, including:TV-min, l1-min, laplacian, andwaveletl1-min.Multi-channel (collaborative) regularization terms, like:TNV(Total Nuclear Variation).Filtered Back-Projection (FBP), and its data-dependent filter learning variant
(PyMR-FBP).Two projector backends, based on:astra-toolboxandscikit-image.Guidedregularization parameter selection, through cross-validation and elbow method.Projectionalignmentroutines.It contains the code used for the following paper, which also provides a
mathematical description of the attenuation correction concepts and algorithms used here:N. Viganò and V. A. Solé, "Physically corrected forward operators for
induced emission tomography: a simulation study," Meas. Sci. Technol., no.
Advanced X-Ray Tomography, pp. 1–26, Nov. 2017.https://doi.org/10.1088/1361-6501/aa9d54Other useful information:Free software: BSD 3-Clause licenseDocumentation:https://cicwi.github.io/PyCorrectedEmissionCT/Getting StartedIt takes a few steps to setup PyCorrectedEmissionCT on your
machine. We recommend installingAnaconda package managerfor
Python 3.Installing with condaSimply install with:conda install -c n-vigano corrctIf you want fast tomographic projectors using the astra-toolbox:conda install -c astra-toolbox astra-toolboxInstalling from PyPISimply install with:pip install corrctIf you are on jupyter, and don't have the rights to install packages
system-wide (e.g. on jupyter-slurm at ESRF), then you can install with:! pip install --user corrctInstalling from sourceTo install PyCorrectedEmissionCT, simply clone this GitHub
project. Go to the cloned directory and run PIP installer:git clone https://github.com/cicwi/PyCorrectedEmissionCT.git corrct
cd corrct
pip install -e .Running the examplesTo learn more about the functionality of the package check out our
examples folder.Authors and contributorsNicola VIGANÒ-Main developerJerome LESAINT-ContributorPatrick HARRISON-ContributorSee also the list ofcontributorswho participated in this project.How to contributeContributions are always welcome. Please submit pull requests against themasterbranch.If you have any issues, questions, or remarks, then please open an issue on GitHub.LicenseThis project is licensed under the BSD license - see theLICENSE.mdfile for details.ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.0.9.0 - 2023-12-24AddedQR decomposition for structured illuminationBackground computation function from projection edgesBasic alignment routines:Simple pre-alignment methods, for projection alignmentStack shift tracking, for correcting image driftsExperimental astra-toolbox backend support (direct FP and BP)Basic phase contrast support:Computing and plotting delta-over-betaComputing TIE and CTF phase propagation functionsMLEM solver (thanks to J. Lesaint #20)FixedMulti-platform pip conda package buildingType hinting fixesFull-field transmission flat-fielding0.8.1 - 2023-05-16AddedPower spectrum calculation function.FixedPypi package creation.0.8.0 - 2023-04-06AddedGhost imaging support (structured illumination):Theoretical mask generation (incl. MURA, Half-Gaussian, Bernoulli)Dedicated projector (CPU based).FixedCircular mask initialization0.7.2 - 2023-02-17AddedDefault VolumeGeometry creation from volume.Tapering border size support in volume mask.1D gradient based regularizer shortcut.Isotropic undecimented wavelet regularizer support.FixedFluorescence line selection case sensitive bug.Verbose feedback in parabolic fitting for parameter tuning.0.7.1 - 2022-10-31AddedMore documentation / tutorial content.Energy conversion functions (keV to m, and vice versa).Tapering for truncated volumes in FSC computation.FixedTypo that preventing usingProjectionGeometryfrommodels.Shape dimensions (XYZ vs ZXY) interpretation inVolumeGeometryand other functions.Cross-validation data term initialization in solvers.Tapering to circular masks.0.7.0 - 2022-10-11AddedWide API refactoring: renamed various modules, and moved processing routines to sub-package.Initial draft of tutorial. More documentation on the way.Line intersection computation.Plotting of FRCs.Tests: initial support for projectors.FixedTypo in function name.Simplified examples 01 and 02.FRC/FSC axes selection.0.6.0 - 2022-09-08AddedMulti-channel (collaborative) regularization (including TNV - Total Nuclear Variation).Support for custom (external, user defined) projection backends.Dedicated FBP filters module.Parallelization of guided regularization functions.A lot of work towards full type hinting usage.FixedPotential memory leak in astra-toolbox projector backend.Gradient and laplacian implementations for arbitrary directions.Output and consistency from tests for solver classes.Residual norm computation in the weighted least squares data term.Dimension mismatch in projector, when using only one angle.Back-projection normalization in scikit-image projector backend.0.5.1 - 2022-06-23AddedBetter support for FBP:Dedicated solver class.Support for 3D geometries.Use of scikit-image's filters, withrfft.Support for various padding modes (constant, edge, etc).Support for various padding modes in gradient, Laplacian and convolution operators.Support for Lorentzian and sech^2 beam shapes.Computation of Center-of-Mass for volume.FixedBorder behavior in convolution operator.Sanitized projector's angle input.Denoising / deconvolution method.Models: handling of astra-toolbox's 2D rotation direction.0.5.0 - 2022-04-14AddedNew module calledmodels:VolumeGeometry: description of the volume.ProjectionGeometry: description / manipulation of the projection geometry.Support for unmatched pixel-voxel size, cone beam geometry, uneven volume shape.Arbitrary geometry, including tilted detector.Convolution operator and deconvolution support.Support for rotating projection stack.Support for computing cross-correlation curves.Computation of PSF for pencil beam scanning with gaussian beam.Support for computing attenuation maps outside the corrected projector.FixedPixel weights, when having small outliers.Volume mask generationDimension bug in azimuthal integration.Inconsistency between astra-toolbox and scikit-image backends.0.4.2 - 2022-01-14AddedSupport for XRF line handling (Siegbahn).Support for log-scaling of data weigths.More type hinting and docstrings.Fixed3D volume support (especially in astra-toolbox backend).Attenuation correction in 3D volumes.Handling of multi-detector in attenuation corrected projector (non-symmetric).Handling of multi-detector in SART.Wavelet scaling in regularizers.Installation instructions.Flat-fielding function.Updated examples to latest solvers changes.0.4.1 - 2021-12-06AddedUncertainty propagation functions, for weighted minimizations.Unpreconditioned l1-minimization (standard behavior).FixedDouble application of weights in SIRT weighted least squares.Use PDHG preconditioning by default.Wavelet approximation minimization by default.0.4.0 - 2021-11-29AddedMoved data terms and regularizers to dedicated module.Conditional minimization of low pass (approximation) portion of wavelet decomposition.Cross-validation and L-curve methods for selecting regularization parameters.Support for different regularization weights across reconstruction volume.Improved corrected projector performance.Restructured and expanded test phantom creation.Basic multi-threading support for CPU operations.Initial type hinting.FRC/FSC and azimuthal integration support.Automatic image denoising (with cross-validation).FixedSize of transformed volumes in dwt.Deprecation warnings from recent numpy versions.Warning in scikit-image projector backend.Copy of x0 and data terms in solvers.Angle consistency among different projectors.ProjectorMatrix when using precondioned PDHG solver.0.3.2 - 2021-04-15Addedscikit-image backend, as preferred in 2D non-GPU reconstructions.Renamed AttenuationProjector into ProjectorAttenuationXRF.Support for test/cross-validation sets in solvers.Residual calculation with different data-fidelity terms.Projection matrix based projector.FixedPyWavelets interface change.Background usage in the data terms.Examples on the different data-fidelity terms.Github workflows to use pip instead of conda.0.3.1 - 2020-10-20AddedFFT operator, and FFT regularizer.l2-gradient (smooth) regularizer.Support for multiple regularizers.FixedNorm l2b (deadzone) is also weighted now.Weighted least-squares implementation.Crop inverse DWT output when necessary.Changelog of 0.3.00.3.0 - 2020-09-23AddedData fidelity classes:Use as norms for regularizers.New classes: Huber norm, l12, l2b (l2 with deadzone), l1b (l1 with deadzone).Residual computation.Background bias support.Regularization:New classes: smoothness based on gradient, Huber TV, decimated wavelets, Huber wavelet, median filter.Constraint classes (lower and upper limits) based on regularization.Simplified and unified code.Solvers:SIRT now supports various l2 norm data terms.CP and SIRT report better information on regularization.Use of data term to compute residual correctly.More flexibility and options to image denoiser.New module for easing development of tests and examples.FixedPython hard crash when CUDA not available.Examples to comply with recent changes.Axes passing to wavelet transform.Stationary wavelet weights calculation.0.2.4 - 2020-06-01AddedOperator form (based on scipy.linalg.LinearOperator) for regularizers and projectorsData fidelity function classes, including weighted least-squaresMore test coverageSupport for non GPU reconstructions (in 2D)Multi-dimensional volume mask creationFixedSIRT regularizationWindows conda package build, and Python 3.8 targetLaplacian regularizer normWavelet regularizer normalization0.2.3 - 2020-05-05AddedOn-demand padding for Wavelet regularizerProjection intensity rescaling for different angles in base projectorSupport for 3D absorption maps (but not thouroughly tested, yet)Data-term residual computation to all solversSome tests to solvers and regularizersAutomated testing and linting on github workflowsSupport for ASTRA's super-sampling of pixels and voxelsImplemented scipy's sparse LinearOperator interface for the projectorsUtility min-log and simple flat-fielding functions for transmission dataFixedCopy-paste error, and detector data axis order in SART algorithm implementationWeights for masks in SART algorithmError in unpreconditioned CP implementationApplied linting changes, to improve the readability of the code0.2.2 - 2020-03-30AddedUnpreconditioned Chambolle-Pock algorithm (as default)Utility functions for sinogram padding and circular volume mask creationFBP data-dependent filters from D. PeltImproved performance of backprojection in non-symmetric uncorrectedFixedWavelet decomposition along one dimensionTV regularizer for dimensions larger than ndimsDocumentation and linksHandling of matrices0.2.1 - 2020-02-25AddedNew regularizers: non-decimated wavelets and laplacianSolvers: added projection masks, relaxation parameters, sirt regularizersUncorrected projector for 2D and 3D dataFixedsub-pixel attenuation correction0.2.0 - 2019-11-05AddedMulti-detector reconstructionFixedTV-min signSolvers' name visualizationBack-projection behavior with different inputs0.1.0 - 2019-10-29AddedInitial release, with corrected forward and back-projections.SIRT, SART, and Chambolle-Pock solvers.TV-min and l1-norm based regularizers.