Skip to main content

A package for working with Quantitative Phase TIFF files

Project description

QPTiffFile

A Python package for working with Quantitative Phase TIFF (QPTIFF) files, commonly used in multiplex imaging and digital pathology.

PyPI version License: MIT

Overview

QPTiffFile provides tools for reading, processing, and analyzing QPTIFF image files. The package offers:

  • Automatic extraction of biomarker/fluorophore information
  • Memory-efficient tools for extracting regions of interest from large images
  • Support for multi-channel and multi-resolution imagery

Installation

From PyPI (Coming soon)

pip install qptifffile

From Source (The only way currently)

git clone https://github.com/grenkoca/qptifffile.git
cd qptifffile
pip install -e .

Example images

Example .qptiff files are supplied by Akoya Biosciences (formerly owned by Perkin-Elmer): link

Additionally, a .qptiff file specification document can be found here: link

System Requirements

For full functionality including compressed TIFF support, you'll need:

macOS

# For Apple Silicon
brew install libaec

# For Intel Macs
brew install libaec

note: on Apple Silicon chips, you may need to install libaec via conda: https://anaconda.org/conda-forge/libaec/

Linux

# Ubuntu/Debian
sudo apt-get install libaec-dev

# CentOS/RHEL
sudo yum install libaec-devel

Dependencies

Core dependencies:

  • tifffile
  • numpy

Optional dependencies:

  • imagecodecs (recommended for compressed TIFF support)

Usage Examples

Basic QPTIFF File Reading

from qptiff import QPTiffFile

# Open a QPTIFF file
qptiff = QPTiffFile('example_image.qptiff')

# Display available biomarkers
print(qptiff.get_biomarkers())

# Print summary of all channels
qptiff.print_channel_summary()

# Read specific biomarker channels
dapi_image = qptiff.read_region('DAPI')
cd8_image = qptiff.read_region('CD8')

# Read multiple biomarkers
markers = qptiff.read_region(['DAPI', 'CD8', 'PD-L1'])

Working with Regions of Interest

# Extract a specific region (x, y starting position and width, height)
region = qptiff.read_region(
    layers=['DAPI', 'CD8', 'PD-L1'],
    pos=(1000, 2000),
    shape=(500, 500)
)

# Work with lower resolution pyramid levels
overview = qptiff.read_region(
    layers=['DAPI'],
    level=1  # Lower resolution pyramid level
)

Citation

If you use this software in your research, please cite:

@software{qptifffile,
  author = {Grenko, Caleb},
  title = {QPTiffFile: A Python package for working with Quantitative Phase TIFF files},
  url = {https://github.com/grenkoca/qptifffile},
  year = {2025},
}

Contact

The best way to get in touch is via email: grenko.caleb (at) mayo.edu

Acknowledgments

  • Based on the excellent tifffile library by Christoph Gohlke

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qptifffile-0.0.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

qptifffile-0.0.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file qptifffile-0.0.1.tar.gz.

File metadata

  • Download URL: qptifffile-0.0.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for qptifffile-0.0.1.tar.gz
Algorithm Hash digest
SHA256 40bdde2b26694c9bd1d8812b85159f0c85539e277060c3af8d0e51a9c3819e38
MD5 7ec9d024317b0a931c6e91c59e63414f
BLAKE2b-256 18c12173f0aa7cc4a80f509cdad5924d771f8398c0e67a8d85d36abeea63d031

See more details on using hashes here.

File details

Details for the file qptifffile-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: qptifffile-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for qptifffile-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d1e6d9378c06de96e1af1fb7d14ac173fb92f9702c02713752167ae24f745cf
MD5 ec7b48eeaade9526141cd1aaeb626335
BLAKE2b-256 ea68d7ed92a0ede2bebe8bac65b9b825c9c32531a24cc829672aca73c9e3abfc

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