Acousto-Optic Tomography Reconstruction Library
Project description
AcoustoOpticTomography (AOT_biomaps)
AOT_biomaps is an advanced Python library for Acousto-Optic Tomography (AOT). It provides comprehensive tools for image reconstruction, acoustic simulation, optical modeling, and 2D/3D data processing.
๐ About the Project
This library was developed to meet the needs of the biomedical imaging research community, particularly for Acousto-Optic Tomography applications. It combines advanced reconstruction algorithms with optimized CPU and GPU implementations.
Key Features
- โ Tomographic Reconstruction: MLEM, PDHG, LS, DEPIERRO, MAPEM, LBFGS
- โ Multi-Device Support: CPU (NumPy) and GPU (CuPy) with automatic fallback
- โ Sparse Matrices: Optimized CSR and SELL-C-sigma implementations
- โ Acoustic Simulation: Plane, focused, irregular waves
- โ Optical Modeling: Lasers, absorbers, heterogeneous media
- โ Signal Processing: Filtering, backprojection, Radon transform
- โ Visualization: 2D/3D visualization tools (optional with matplotlib)
Modular Architecture
AOT_biomaps/
โโโ AOT_Acoustic/ # Acoustic simulation
โโโ AOT_Experiment/ # Experiment management
โโโ AOT_Medium/ # Medium modeling
โโโ AOT_Optic/ # Optical modeling
โโโ AOT_Recon/ # Reconstruction algorithms
โ โโโ AOT_Optimizers/ # MLEM, PDHG, LS, etc.
โ โโโ AOT_PotentialFunctions/ # Potential functions
โ โโโ AOT_SparseSMatrix/ # Sparse matrices (CSR, SELL)
โโโ Config.py # Global configuration
๐ Installation
See INSTALLATION.md for detailed instructions.
Quick Installation
# Clone the repository
git clone https://github.com/LucasDuclos/AcoustoOpticTomography.git
cd AcoustoOpticTomography
# Install in development mode
pip install -e .
### GPU Support (Included by Default)
By default, **CuPy** is automatically included if CUDA is detected on your system. The installer will detect your CUDA version and install the appropriate CuPy package.
To manually specify your CUDA version:
```bash
# For CUDA 11.x
pip install cupy-cuda11x
# For CUDA 12.x
pip install cupy-cuda12x
# For CUDA 13.x
pip install cupy-cuda13x
# For CUDA 14.x
pip install cupy-cuda14x
CPU-only installation:
pip install aot-biomaps --cpu
# or
AOT_BIOMAPS_CPU_ONLY=true pip install aot-biomaps
๐ Documentation
- ๐ฅ Installation - Complete installation guide
- ๐ฏ Usage - Examples and tutorials
- ๐ง API Reference - Technical documentation
- ๐๏ธ Architecture - Library design
- ๐ค Contributing - How to contribute
- ๐ Changelog - Release history
๐ฏ Quick Start Example
import numpy as np
from AOT_biomaps import Tomography, AlgebraicRecon
from AOT_biomaps.AOT_Recon.ReconEnums import ReconType
# Create a tomography experiment
experiment = Tomography(
optic_image_path="path/to/optic_image.npy",
acoustic_fields_path="path/to/acoustic_fields.npy"
)
# Setup reconstruction
recon = AlgebraicRecon(
experiment=experiment,
reconType=ReconType.Algebraic,
optimizerType="MLEM",
numIterations=100
)
# Run reconstruction
recon.run(withTumor=True)
# Save results
recon.save(withTumor=True, saveDir="results/")
๐ง Dependencies
Core Dependencies (Required)
- Python โฅ 3.8
- NumPy โฅ 1.20
Optional Dependencies
- CuPy โฅ 10.0 - For GPU acceleration
- Matplotlib โฅ 3.0 - For visualization
- tqdm โฅ 4.0 - For progress bars
- SciPy โฅ 1.7 - For signal processing
- kWave - For acoustic simulation (optional)
Compatibility Matrix
| Feature | CPU (NumPy) | GPU (CuPy) |
|---|---|---|
| MLEM Reconstruction | โ | โ |
| PDHG Reconstruction | โ | โ |
| CSR Matrices | โ | โ |
| SELL Matrices | โ | โ |
| Visualization | โ | โ |
| Acoustic Simulation | โ | โ ๏ธ (kWave required) |
๐ Performance
Benchmark (on standard dataset)
| Algorithm | CPU (s) | GPU (s) | Speedup |
|---|---|---|---|
| MLEM | 45.2 | 2.1 | 21.5x |
| PDHG | 38.7 | 1.8 | 21.5x |
| LS | 22.4 | 1.2 | 18.7x |
Memory Usage
| Matrix | Format | Size (GB) |
|---|---|---|
| 100x100x100x50 | Dense | 19.1 |
| 100x100x100x50 | CSR | 0.8 |
| 100x100x100x50 | SELL | 0.6 |
๐ค Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
How to Contribute
- Fork the project
- Create a branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
Distributed under the MIT License. See LICENSE for more information.
๐ Acknowledgments
- Biomedical Imaging Laboratory
- All contributors who participated in this project
Contact: For any questions or suggestions, feel free to open an issue or contact me directly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aot_biomaps-2.9.598.tar.gz.
File metadata
- Download URL: aot_biomaps-2.9.598.tar.gz
- Upload date:
- Size: 122.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f1954243ab9ef7c8d1fd777104956cca6aa3f0c37a4de3a8b7d6a4b74b3a207
|
|
| MD5 |
09ba457ac5926b2085302b3066cb0935
|
|
| BLAKE2b-256 |
1e407d2f393dad6e84aa6c0a9a0ae57255f6610659fbb81515e0cdab9e5496fd
|
File details
Details for the file aot_biomaps-2.9.598-py3-none-any.whl.
File metadata
- Download URL: aot_biomaps-2.9.598-py3-none-any.whl
- Upload date:
- Size: 162.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f1eef88ca6ad12f2c088f047c7a55de44a0f9f6ffea17940062eb8f4919ae6
|
|
| MD5 |
62cb294b62cefc401172fc0f79344ed5
|
|
| BLAKE2b-256 |
1d7cb73f53a90d05b58180e5a24b6bfd533d1bf99567eef7e8a912ab6ca69084
|