Skip to main content

A fast digital pathology image decoder powered by Rust

Project description

Eozin Python: The dye-namic solution for digital pathology

A fast digital pathology image decoder powered by Rust. The library's primary purpose is to provide efficient access to individual tiles within digital pathology images. The name is derived from eosin, an essential dye solution used in pathological diagnosis.

Quickstart

This example demonstrates how to select the lowest resolution level from a digital pathology image in a native Rust environment, retrieve the central tile within that level, and save it as a JPEG file.

from eozin import Eozin
from PIL import Image

# Load a slide image
slide = Eozin("/some/slide.svs")

# Get dimensions of the slide at level 0 (full resolution)
slide_width, slide_height = slide.dimensions

# Get the index of the lowest resolution level
lowest_resolution_level = slide.level_count - 1

# level_tile_ranges returns a list of tuples:
# [(horizontal_tiles, vertical_tiles), ...]
lowres_tile_ranges = slide.level_tile_ranges[lowest_resolution_level]

# Retrieve the tile at the center of the level
# lowres_tile_ranges[0] is the width in tiles, and [1] is the height in tiles.
lowres_centered_tile: Image.Image = slide.read_tile(
  lowest_resolution_level, 
  lowres_tile_ranges[0] // 2, 
  lowres_tile_ranges[1] // 2, 
)
lowres_centered_tile.show()

# Extract a specific region (OpenSlide-like API)
# read_region(location, level, size)
region: Image.Image = slide.read_region((0, 0), 0, (1024, 1024))

Core Concept

Digital pathology images are captured using high-magnification microscopes, resulting in massive images that can reach hundreds of thousands of pixels in dimension. Because storing such large images in standard formats is impractical, they are designed as containers comprising small rectangular images called tiles.

Furthermore, since downscaling these images on the fly is computationally expensive, they typically store multiple lower-resolution versions, referred to as levels. Vendors have developed various proprietary formats, and libraries like OpenSlide and bioformats have been instrumental in handling them.

The motivation for Eozin is to provide lightweight and fast access to these tiles. Specifically, each tile is stored as a fragmented byte sequence; Eozin calculates the byte offset based on the requested level and coordinates, then appends the necessary headers so the buffer can be interpreted as a standard image format.

Pixel-level processing (such as intensity manipulation) is intentionally left to established libraries—such as the image crate in Rust, Pillow in Python, or Blob objects in JS/Web environments.

Since the I/O and decoding logic are completely decoupled, Eozin can be adapted to various environments. Client-side rendering in the browser achieves performant response times, and its efficiency is also ideal for high-throughput AI interpretation and analysis.

Notes

Vendor and file format names mentioned in this library are the property of their respective owners. This library is not certified for clinical use.

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

eozin-0.1.0a2.tar.gz (610.6 kB view details)

Uploaded Source

Built Distributions

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

eozin-0.1.0a2-cp38-abi3-win_arm64.whl (212.3 kB view details)

Uploaded CPython 3.8+Windows ARM64

eozin-0.1.0a2-cp38-abi3-win_amd64.whl (219.1 kB view details)

Uploaded CPython 3.8+Windows x86-64

eozin-0.1.0a2-cp38-abi3-win32.whl (210.9 kB view details)

Uploaded CPython 3.8+Windows x86

eozin-0.1.0a2-cp38-abi3-musllinux_1_2_x86_64.whl (568.7 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

eozin-0.1.0a2-cp38-abi3-musllinux_1_2_i686.whl (606.0 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ i686

eozin-0.1.0a2-cp38-abi3-musllinux_1_2_armv7l.whl (642.5 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARMv7l

eozin-0.1.0a2-cp38-abi3-musllinux_1_2_aarch64.whl (535.6 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

eozin-0.1.0a2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (364.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

eozin-0.1.0a2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (390.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

eozin-0.1.0a2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (480.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

eozin-0.1.0a2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (366.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

eozin-0.1.0a2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (359.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

eozin-0.1.0a2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (392.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.5+ i686

eozin-0.1.0a2-cp38-abi3-macosx_11_0_arm64.whl (323.3 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

eozin-0.1.0a2-cp38-abi3-macosx_10_12_x86_64.whl (321.9 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file eozin-0.1.0a2.tar.gz.

File metadata

  • Download URL: eozin-0.1.0a2.tar.gz
  • Upload date:
  • Size: 610.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eozin-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 b3386069eff51dd126cc0ef8d36848a6ead2ede866b3b2e65ef052b30226faf5
MD5 088251c34f4bf7f8af6d3137b21bf061
BLAKE2b-256 656b0530a63f1f5c067b84ac6ebeccd8588f62e343933c582600761f4fa88eb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2.tar.gz:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: eozin-0.1.0a2-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 212.3 kB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c1065ac8602a8a49e90edcf3e3db6bdb9a66736fc895e561f14835c64ec53025
MD5 24f832218b2a71cc4e17fed9fe7ccc01
BLAKE2b-256 3e4561fd94f104d61c2bd36e9f2d4f560b0a16acfc4d9fedff3cf2becf99a2af

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-win_arm64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: eozin-0.1.0a2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 219.1 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 17f6bdb413e50f96e0790851816b4fa0455bd958532233f46d45d1329340aa45
MD5 4803347b5853e81eb0ecf9fc922be7a5
BLAKE2b-256 9d52b7cf7ca6303e56c84d55b4614d56e6a6a9bab32846e30a5e8f82cb5c629b

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-win_amd64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-win32.whl.

File metadata

  • Download URL: eozin-0.1.0a2-cp38-abi3-win32.whl
  • Upload date:
  • Size: 210.9 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 62d50815039ef54b52fd2d5a7fc052b2ea54a5a6b1c25eac1ed938dc62b42173
MD5 d61db638f9755f158535e2990a441ec1
BLAKE2b-256 98fd6e75bc01ecc45a7e76b12ca293be4b57d9ca67e3496fc1b5136d7152a450

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-win32.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 572486f0294ec630b3e7de570ef07864dce55466bf2403d0e54e81ce8030dd95
MD5 9fab7e9b7aa2e667d90bd4a4c28d53d8
BLAKE2b-256 cbf6b65beaaa268b9536ab90c89bbb16f663beebf0ed82889f50708294f16a95

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_x86_64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-musllinux_1_2_i686.whl.

File metadata

  • Download URL: eozin-0.1.0a2-cp38-abi3-musllinux_1_2_i686.whl
  • Upload date:
  • Size: 606.0 kB
  • Tags: CPython 3.8+, musllinux: musl 1.2+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2acd2f23603c883af0fc4587dc1202d688b31f0d20f8b7795a1180a30d3474ba
MD5 d3bfbb5caa81435bfc244c6dfc1a4b42
BLAKE2b-256 9e46bb5f515831d260e8b45b4b676704672c6c2bf5aad2295335fbab0fd6ea2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_i686.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 20cd719d2c6fee9fb0d5b542c37d6b0bff5d60deb9ddb07a02ea4cb4264d26ed
MD5 8a0a57d3df2d834b83ffa36c0f390c40
BLAKE2b-256 769aef320046c3a17cef64c26e476b6097c2adebac131c866d612d559aefabbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_armv7l.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 53290d2f144e97e5ecfbcfd12863694af67ba3c555efc5c8e6a8468806185356
MD5 eb9067aa8cf80ead4d89d4ea0721747b
BLAKE2b-256 6666e11796b82ece23ea9d8f7b7c7b6ac0ea6b9a236036374d3d4443cff4a15b

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-musllinux_1_2_aarch64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 570c6eb07271723e7c850ffa25e1667b735805aaf434a0253769df366eb245c8
MD5 2ba2c322f6b9901ede5a844c47331ea3
BLAKE2b-256 24164cab186b7df3c548e4b17dff8ab7c14855e2406fe2c66181ed8c9e82ef32

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 563cf702b35041ff4d694924734510fb8ea2562a650e159323fa7f652326178b
MD5 63a5cb4c7e638a2117d113d84a46f838
BLAKE2b-256 fb1782db340f65ea3928ad7f4f9d9814d30b67b5c5bdb052735ea6dc0e86ca20

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 49429e7f066c2fe68454158a794eba030e56c15090075dd134de07e84bdccb47
MD5 ffc890fe3a14a0b0bc40eb9fb5742463
BLAKE2b-256 4b0675deea3cf873a581069c1ee4be179c58d32ead089c32c367652ed791421f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b1e9705ae9bfe2ecaae762853ef322040eb4f7e0e7f6fe268c451f51e45ecb08
MD5 f22eab99ffc4f7e643bdc650766300b4
BLAKE2b-256 1e311e8512cf3dc7d6791a8992bc849e1e0f3caea838d29c9e95ea8e4b7a9862

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 72edbe8c732c64503e60480548505caa931be6233c3cfdb1fb01f31de1115b2e
MD5 2f666b075883302351fff5d9e1450bb3
BLAKE2b-256 161dd53349e0ca04507da42b855ee28049a0a0a365bdf033943c67d9da4a7afe

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 906219952dce33ce9f071d6a4d8575d4fe4378bf61a08c4020f1fa107c0e73a6
MD5 affc6ad6708b012ca8a0eb10b5da221b
BLAKE2b-256 3d985f9a0a26dc4e4dee995236cd8b67c27deba76c290d0af17d75ee8a6da0c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16d96589845cf92c8014a4d6c02c80070737d37feee3fa2014f836fa4d1d3ac5
MD5 427c00ae745e5ccf83074afb1e1168f6
BLAKE2b-256 f726d3af80c94ed76301d4a5b5b89dedd92691796295844b905aa6834e7f9b39

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eozin-0.1.0a2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for eozin-0.1.0a2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fcf83b2e2e4eec49574ae6b17810674f62afcc0ba53b994dd497e402332fc01f
MD5 dafe9b9e505fecacecffcd4e1e85f2ff
BLAKE2b-256 4ae257c359df7b8a0cff4c9aef49d31dbc71476eae6bb99e9bd98f25a87c4607

See more details on using hashes here.

Provenance

The following attestation bundles were made for eozin-0.1.0a2-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: pypi_release.yml on yujota/eozin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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