{"id":27717347,"url":"https://github.com/aakashks/ct-reconstruction-3d","last_synced_at":"2026-05-04T07:35:23.190Z","repository":{"id":212622555,"uuid":"703646859","full_name":"aakashks/CT-Reconstruction-3D","owner":"aakashks","description":"Performing 3D Cone Beam CT Reconstruction on GPU","archived":false,"fork":false,"pushed_at":"2024-10-13T07:52:11.000Z","size":48109,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T03:37:12.815Z","etag":null,"topics":["computer-vision","cone-beam-ct","ct-reconstruction","imaging","linear-algebra","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aakashks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-11T16:21:20.000Z","updated_at":"2025-01-23T11:09:13.000Z","dependencies_parsed_at":"2023-12-15T09:37:57.925Z","dependency_job_id":null,"html_url":"https://github.com/aakashks/CT-Reconstruction-3D","commit_stats":null,"previous_names":["aakashks/ct-reconstruction-3d"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashks%2FCT-Reconstruction-3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashks%2FCT-Reconstruction-3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashks%2FCT-Reconstruction-3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashks%2FCT-Reconstruction-3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aakashks","download_url":"https://codeload.github.com/aakashks/CT-Reconstruction-3D/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251085167,"owners_count":21533822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","cone-beam-ct","ct-reconstruction","imaging","linear-algebra","pytorch"],"created_at":"2025-04-27T03:37:20.302Z","updated_at":"2026-05-04T07:35:18.155Z","avatar_url":"https://github.com/aakashks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3D Cone Beam Computed Tomography (CBCT) Reconstruction\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1yMaL2ncDc1oZ0aMXkispxZCXotWLNgaf?usp=sharing)\n\nReconstruct object's attenuation constant data from projections captured by the detector.\n\nThis code has been written for cone beam based geometry.\nCone beam CT is a more recent development which emits a \"cone type\" X-ray and is detected by a flat panel sensor.\n\n\u003cimg alt=\"diagram of a typical cone beam setup for 3D situation\" height=\"350\" src=\"https://media.aofoundation.org/-/jssmedia/surgery/9x/9x_x001_i120.png\"/\u003e\n\n## Mathematical statement\n\nThe problem is expressed mathematically as: A λ = d\n\nA is the intercept matrix containing lengths of X-ray intercepts on each voxel within the object.\nλ is the attenuation coefficient data for each voxel, which is the desired output.\nd is the sinogram, calculated as -\n\n$$d=\\ln(\\frac{I_o}{I})$$\n\nwhere,\n\n- $I_o$ is the intensity of the X-ray source.\n- $I$ is the intensity observed by the detectors.\n\n## Methodology\n\nUsually, the FDK algorithm is used to reconstruct the volume directly without calculating the intercept matrix A. \n\nHowever, this project aims to calculate and study the intercept matrix specifically. A 3 dimension version of Siddon's method is used to calculate it. The volume can be reconstructed by computing $A^{-1} d$.\n\nAs the matrix is large and sparse, it is impossible to find its inverse simply. Therefore, we study ways to create a more dense matrix and to efficiently approximate $A^{-1} d$. One nice method is to use pseudoinverse.\n\n## Fan Beam CT Reconstruction (2D)\n\n\u003cimg alt=\"Fan Beam (Top) versus Cone Beam (Bottom) Tomography\" height=\"250\" src=\"/assets/fan_beam_vs_cone_beam.jpg\"/\u003e\n\nThe top is fan beam configuration for 2D image. The figure shows how it differs from the cone beam geometry (bottom) used in this repo. The code for 2D reconstruction is [here](https://github.com/aakashks/CT-Reconstruction-2D/blob/main/).\n\n## Results\n\nGenerated projection (forward problem) for 1 rotation. [results for more rotations](results/generated_vs_projections/)\n\n\u003cimg alt=\"Reconstructed projection vs the collected projection data\" height=\"350\" src=\"results/generated_vs_projections/rot1.png\"/\u003e\n\nThese results assure the correctness of the generated intercept matrix (A).\n\nThe current code can generate the 50 rows of the whole matrix, ie. for 50 rotations of the object in less than 7 hours on a single NVIDIA P100 GPU with 16 GB RAM for 200x200 resolution.\n\n## References\n\n1. The data has been collected from experiments conducted at DDIL, IIT Roorkee\n2. G. Aldica, Ion Tiseanu, Petre Badica, \u0026 Rindfleisch, M. (2010, August 18). X-ray Micro-Tomography as a New and Powerful Tool for Characterization of MgB2 Superconductor. ResearchGate\n3. Cone beam vs. fan beam CT. (2023). [Aofoundation.org](https://surgeryreference.aofoundation.org/cmf/further-reading/cas-cone-beam-vs-fan-beam-ct#introduction)\n4. [Siddon's Algorithm](https://stackoverflow.com/questions/3609382/calculating-the-length-of-intersections-through-a-2d-grid)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faakashks%2Fct-reconstruction-3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faakashks%2Fct-reconstruction-3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faakashks%2Fct-reconstruction-3d/lists"}