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.650.tar.gz (122.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.650-py3-none-any.whl (160.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.650.tar.gz
  • Upload date:
  • Size: 122.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.650.tar.gz
Algorithm Hash digest
SHA256 4b8dfb5bdd0cd6af2b03dfacf5a8c458a12046f5229fbeda627374d44b71a276
MD5 6e6cf12329c3e6726abf9e0ed9f9f422
BLAKE2b-256 abb42c7e6ee20cf6618c6891929803b5df653997b3d082f2295732597ecb29c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.650-py3-none-any.whl
  • Upload date:
  • Size: 160.6 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.650-py3-none-any.whl
Algorithm Hash digest
SHA256 37bb878847b4ef2078e64df27f699d3165d8d36d083eb8c5d12ad8339e8a3d59
MD5 70b6755f16771fe0b1daf15f83a90514
BLAKE2b-256 584952a63b4b234ab2c1c7f5b577ebc2b531454c3b6c46bb5ae40ebbc2f02f8e

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