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.743.tar.gz (126.1 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.743-py3-none-any.whl (169.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.743.tar.gz
  • Upload date:
  • Size: 126.1 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.743.tar.gz
Algorithm Hash digest
SHA256 16c7c4b65d232881d6cae481f629f1b089836d41528819a5f90882e23161bcc5
MD5 7cd8d9832a293ad70942b61d7befb266
BLAKE2b-256 e86839968b316a839c4467bedc88d8fdc001d9964cf0ea2ef48b2c4fe355c737

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.743-py3-none-any.whl
  • Upload date:
  • Size: 169.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.743-py3-none-any.whl
Algorithm Hash digest
SHA256 f5343651b2d697c3b73df1e1f1504a60fd98ee2787a1654a3ba7a0220fbd44cf
MD5 480f72ebc91d0aae5e4c1a3a65ad9754
BLAKE2b-256 4c28fbb02aca4316c34df47f8f964a929d39d686f9568af0aa727c5ba409cc23

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