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.670.tar.gz (123.9 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.670-py3-none-any.whl (162.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.670.tar.gz
  • Upload date:
  • Size: 123.9 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.670.tar.gz
Algorithm Hash digest
SHA256 cc040819fbfbbef158852da7228ef8d9af46d49555f91a2bfc066e2aaccbf21e
MD5 c6c71659d989760260e47d6a57341403
BLAKE2b-256 04d22a4b73167dffd4729485337714eebe20663394f18c50a6613ef9c073267c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.670-py3-none-any.whl
  • Upload date:
  • Size: 162.3 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.670-py3-none-any.whl
Algorithm Hash digest
SHA256 2256626fd99e6aeaadfe3c801ffcbf0b390659e615931411f3f52efcd48ffe9c
MD5 0e83b2efaab5f198b0fa761b4c20e055
BLAKE2b-256 e8f143cbc022b391359db52af3b9a147c194b0f37b4c778eb9b262207b7ac22b

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