{"id":46491442,"url":"https://github.com/gianthk/alrecon","last_synced_at":"2026-03-06T10:34:19.985Z","repository":{"id":198902537,"uuid":"701693534","full_name":"gianthk/alrecon","owner":"gianthk","description":"Tomography reconstruction Web App that keeps non-expert users in mind","archived":false,"fork":false,"pushed_at":"2025-04-21T20:11:47.000Z","size":6795,"stargazers_count":4,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T21:26:14.722Z","etag":null,"topics":["ct-reconstruction","graphical-user-interface","image-processing","solara","tomography"],"latest_commit_sha":null,"homepage":"https://open-research-europe.ec.europa.eu/articles/4-54","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/gianthk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-07T09:37:41.000Z","updated_at":"2025-04-21T20:11:50.000Z","dependencies_parsed_at":"2023-10-10T16:23:38.564Z","dependency_job_id":"259da9d2-1202-46ae-9082-277fb6c2e66a","html_url":"https://github.com/gianthk/alrecon","commit_stats":null,"previous_names":["gianthk/alrecon"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gianthk/alrecon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianthk%2Falrecon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianthk%2Falrecon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianthk%2Falrecon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianthk%2Falrecon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gianthk","download_url":"https://codeload.github.com/gianthk/alrecon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianthk%2Falrecon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30171869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ct-reconstruction","graphical-user-interface","image-processing","solara","tomography"],"created_at":"2026-03-06T10:34:19.264Z","updated_at":"2026-03-06T10:34:19.966Z","avatar_url":"https://github.com/gianthk.png","language":"Python","readme":"# Alrecon (الريكُن)\nPure Python Computed Tomography reconstruction web application. Built with [Solara](https://solara.dev/).\n\n[![GitHub license](https://img.shields.io/github/license/gianthk/alrecon)](https://github.com/gianthk/alrecon/blob/master/LICENSE)\n[![DOI](https://zenodo.org/badge/701693534.svg)](https://zenodo.org/doi/10.5281/zenodo.10535211)\n\n![alrecon gif](docs/pictures/alrecon_home.gif)\n\n### How to cite\nIf you use `alrecon` please cite:\n\u003e  Iori et al., (2024). Alrecon: computed tomography reconstruction web application based on Solara. Open Research Europe, 4(54). https://doi.org/10.12688/openreseurope.16863.2  \u003cbr\u003e\n\n## Features\n- CPU and GPU-accelerated CT reconstruction using the [TomoPy](https://tomopy.readthedocs.io/en/stable/) and [ASTRA](https://astra-toolbox.com/) toolboxes\n- Sinogram and reconstructed volume visuzalization with [napari](https://napari.org) or [ImageJ](https://imagej.net/software/fiji/)\n- Control over the sinogram portion to be loaded and processed\n- Module for the optimization of the tomographic center of rotation\n- Module for the correction of sinogram stripe artifacts\n- Phase-retrieval module\n- Different CT reconstruction algorithms, including iterative methods\n- Compression of output volume data to integer and [JPEG 2000](https://en.wikipedia.org/wiki/JPEG_2000) format\n- Job scheduling on reconstruction HPC cluster using [SLURM](https://slurm.schedmd.com/documentation.html)\n- Keep a log of reconstruction jobs to a Google spreadsheet\n\n\u003e [!NOTE]\n\u003e Alrecon uses [TopoPy](https://tomopy.readthedocs.io/en/stable/) and as such supports only parallel-beam reconstruction geometries (synchrotron CT). Reconstruction of fan-beam data is not supported at the moment.\n\n## Installation\n\u003c!-- Install `alrecon` using pip. The flag `[all]` will install optional dependencies required for integration with [`napari`](https://napari.org) and logging to google spreadsheets.\n```commandline\npip install alrecon[all]\n``` --\u003e\n\n1. Checkout this repository:\n```commandline\ngit clone https://github.com/gianthk/alrecon.git\n```\n2. Navigate to the repository and create a virtual environment with all necessary dependencies:\n```commandline\ncd alrecon\nconda env create --file envs/alrecon-base.yml\nconda activate alrecon-base\n```\n\u003e [!NOTE]\n\u003e If you already have a destination virtual environment for alrecon, you can install manually the requirements listed in the file [alrecon-base.yml](envs/alrecon-base.yml).\n\n\u003e [!NOTE]\n\u003e If you don't have conda and want to keep things simple you can install [Miniconda](https://docs.anaconda.com/free/miniconda/index.html) instead.\n\n\u003e [!NOTE]\n\u003e To use TomoPy with CUDA features, install TomoPy through conda following [these instructions](https://tomopy.readthedocs.io/en/stable/install.html).\n\n3. Build the `alrecon` app:\n```commandline\npip install -e .\n```\n\n## Usage\n### Run the `alrecon` [solara](https://solara.dev/api/file_browser) web application on your localhost\n```commandline\nsolara run alrecon.pages --host localhost\n```\n### Run `alrecon` within [jupyter](https://solara.dev/api/file_browser)\n1. Make sure that the `alrecon` virtual environment is activated and `ipykernel` installed:\n```commandline\nconda activate alrecon\npip install --user ipykernel\n```\nor:\n```commandline\nconda install -c anaconda ipykernel \n```\n2. Install [ipykernel](https://github.com/ipython/ipykernel) in the `alrecon` virtual environment:\n```commandline\npython -m ipykernel install --user --name=alrecon\n```\n3. Launch Jupyter Notebook or Jupyter Lab instance:\n```commandline\njupyter lab\n```\n4. Open and run the cells of the notebook [launch_within_jupyter.ipynb](launch_within_jupyter.ipynb). [![Made withJupyter](https://img.shields.io/badge/Made%20with-Jupyter-orange?style=for-the-badge\u0026logo=Jupyter)](launch_within_jupyter.ipynb)\n\nYou can take a look at [solara's documnetation](https://solara.dev/api) for more information on the different ways of running solara applications.\n\n---\n## Integration with Google Sheets\n- `Alrecon` allows you to keep a consistent log of all reconstruction jobs on an online master Google spreadsheet.\n- The integration uses [gspread](https://docs.gspread.org/en/v5.12.0/), a Python API for Google Sheets.\n- You will need to set up your Google Cloud account, enable [Google Sheets API](https://developers.google.com/sheets/api/guides/concepts), and create a Secret Key with read/write permission to your online master Google sheet. Follow [these instructions](https://www.youtube.com/watch?v=hyUw-koO2DA) to setup the integration with Google Sheets API.\n\n### How it works\n1. Set up your Google Cloud account and a Secret Key with read/write permissions as described above\n2. Save your Secret Key and modify the alrecon settings file with the path to your Secret Key file\n3. Create or upload to your Google account a spreadsheet master. You can find a template in `resources/foo_master.xls`\n4. If the option `log to google master spreadsheet` is activated, each time you submit a job to the HPC cluster the reconstruction settings are logged as a new line of the master spreadsheet\n\n## HPC cluster integration\n`Alrecon` can generate reconstruction job files and submit them to the workers of a cluster, if this is available. The current integration assumes that the [slurm workload manager](https://slurm.schedmd.com/quickstart.html) is available on the host, and is designed for the [ID10-BEATS beamline](https://www.sesame.org.jo/beamlines/beats) of SESAME. Here are some general instructions on how to set up alrecon to work with your HPC facility:\n\n- The `remote_user` specified in the alrecon settings file must exist and have `ssh` access to the `remote_host`\n- [`slurm`](https://slurm.schedmd.com/quickstart.html) must be installed and running on the host\n- Slurm job file creation is handled by the `slurm.py` module in `alrecon/components`\n- An example slurm `.job` file is available in `resources/foo.job`\n- At ID-10 BEATS, we use a Python script named `BEATS_recon.py` to perform complete [TomoPy](https://tomopy.readthedocs.io/en/stable/) reconstruction pipelines. The script is available on the [BEATS_recon](https://github.com/SESAME-Synchrotron/BEATS_recon/tree/master/scripts/rum) repository. A copy of the script is in this repository in `resources/BEATS_recon.py`.\n- The `recon_script` specified in the settings file must contain the full path to your reconstruction script (`BEATS_recon.py` in our case). This must be accessible by the host. \n- To adapt alrecon to a different reconstruction script or command:\n    - Start by taking a look at the `slurmjob` class in `alrecon/components/slurm.py`\n    - Create a new set_recon_command method following the example of `set_recon_command_beats`\n\n## Use with [napari](https://napari.org/stable/)\n[napari](https://napari.org/stable/) is a powerful pure Python multi-dimensional image viewer. Alrecon supports napari only when [running the app through Jupyter](#run-al-recon-within-jupyter).\n\n## Setup [ImageJ](https://imagej.net/software/fiji/) launcher\nTo launch [ImageJ](https://imagej.net/software/fiji/) from the alrecon web app follow these steps:\n1. Modify the path to your ImageJ executable in the alrecon general settings\n![alrecon imagej executable path setting](docs/pictures/alrecon_imagej-1.png)\n\n2. Copy the [FolderOpener_virtual.ijm](/imagej_macros/FolderOpener_virtual.ijm) ImageJ macro contained in `/alrecon/imagej_macros/` to the plugin folder of your ImageJ installation. On Linux this is something like `/opt/Fiji.app/macros/`.\n\n## Acknowledgements\n\nThis project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No [[822535]](https://cordis.europa.eu/project/id/822535)(Beamline for Tomography at SESAME [BEATS](https://beats-sesame.eu/)). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianthk%2Falrecon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgianthk%2Falrecon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianthk%2Falrecon/lists"}