CoReSi: a GPU-based software for Compton camera reconstruction and simulation in collimator-free SPECT - Lequertier, Vincent; Testa, Étienne; Maxim, Voichiţa (Physics in medicine & biology, 2025)
Objective. Compton cameras (CCs) are imaging devices that may improve observation of sources of γ photons. The images are obtained by solving a difficult inverse problem. We present CoReSi, a Compton reconstruction and simulation software implemented in Python and powered by PyTorch to leverage multi-threading and to easily interface with image processing and deep learning algorithms. The code is mainly dedicated to medical imaging and near-field experiments where images are reconstructed in 3D. Approach. The code was developed over several years in C++, with the initial version being proprietary. We have since redesigned and translated it into Python, adding new features to improve its adaptability and performances. This paper reviews the literature on CC mathematical models, explains the implementation strategies we have adopted and presents the features of CoReSi. Main results. The code includes state-of-the-art mathematical models from the literature, from the simplest, which allow limited knowledge of the sources, to more sophisticated ones with a finer description of the physics involved. It offers flexibility in defining the geometry of the CC and the detector materials. Several identical cameras can be considered at arbitrary positions in space. The main functions of the code are dedicated to the computation of the system matrix, leading to the forward and backward projector operators. These are the cornerstones of any image reconstruction algorithm. A simplified Monte Carlo data simulation function is provided to facilitate code development and fast prototyping. Significance. As far as we know, there is no open source code for CC reconstruction, except for MEGAlib, which is mainly dedicated to astronomy applications. This code aims to facilitate research as more and more teams from different communities such as applied mathematics, electrical engineering, physics, medical physics get involved in CC studies. Implementation with PyTorch will also facilitate interfacing with deep learning algorithms.