Skip to main content

Acousto-Optic Tomography Reconstruction Library

Project description

AcoustoOpticTomography (AOT_biomaps)

Python 3.8+ License: MIT Status: Active Development

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

๐ŸŽฏ 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

  1. Fork the project
  2. Create a branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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.

๐Ÿ™ GitHub | ๐Ÿ“ง Email

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

aot_biomaps-2.9.697.tar.gz (126.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aot_biomaps-2.9.697-py3-none-any.whl (164.7 kB view details)

Uploaded Python 3

File details

Details for the file aot_biomaps-2.9.697.tar.gz.

File metadata

  • Download URL: aot_biomaps-2.9.697.tar.gz
  • Upload date:
  • Size: 126.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for aot_biomaps-2.9.697.tar.gz
Algorithm Hash digest
SHA256 2eb8371e5b28e3430dcd8067de563e1c691daf85421346c3e4899067a049101e
MD5 c0c58ef634247e2920639f274d45130f
BLAKE2b-256 a8cd935ac3498617bfaad66e56c3ed6d2c3e9add9140f3dffb5dd70f33e661e8

See more details on using hashes here.

File details

Details for the file aot_biomaps-2.9.697-py3-none-any.whl.

File metadata

  • Download URL: aot_biomaps-2.9.697-py3-none-any.whl
  • Upload date:
  • Size: 164.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for aot_biomaps-2.9.697-py3-none-any.whl
Algorithm Hash digest
SHA256 ded771f22f119f2cefe88237f1597c24f95cfe4ff51d9f62d8fb2505c67ba4ae
MD5 3340ddbd6486d235e53b08fbb89a7ce4
BLAKE2b-256 5e6a149b72d965b2d3c3a3dbfd04f900e7e183761b92450265726ba9b65d7008

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page