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.535.tar.gz (126.5 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.535-py3-none-any.whl (157.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.535.tar.gz
  • Upload date:
  • Size: 126.5 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.535.tar.gz
Algorithm Hash digest
SHA256 06e39e5dd6b32d1ef07c54e1ddb75f36cdaf7b14f068cf94bb0bc52b43d6ff1f
MD5 a6a71efaedf94326983b9a36256dec3a
BLAKE2b-256 cea52ec228042a3c9c17756c5e8e18abcc11a89dbd83222e30b49a8202a828db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aot_biomaps-2.9.535-py3-none-any.whl
  • Upload date:
  • Size: 157.9 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.535-py3-none-any.whl
Algorithm Hash digest
SHA256 4ecc6216310744d409e32b0b0007f5e6330c9f8d788ee53316d3705128362552
MD5 8592185d41a222145a26ca620fbfe65c
BLAKE2b-256 7cf50f798ebbb4f9084c4eaca2cffb66850bc60b30f80648c423753f1912a6a0

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