Python bindings for libisyntax
Project description
pyisyntax
A Python library for working with pathology images in the iSyntax file format, powered by libisyntax.
Usage
Read and display a region of the WSI via Pillow.
from isyntax import ISyntax
import PIL.Image
with ISyntax.open("my_file.isyntax") as isyntax:
# Read pixels from the specified region into a numpy array
pixels = isyntax.read_region(500, 500, 400, 200, level=4)
# Convert numpy array into a PIL image
pil_image = PIL.Image.fromarray(pixels)
# Show the image
pil_image.show()
Extract and save the associated macro image.
from isyntax import ISyntax
with ISyntax.open("my_file.isyntax") as isyntax:
# The macro image will be returned as compressed JPEG data.
jpeg_data = isyntax.read_macro_image_jpeg()
# This JPEG data can be written directly to a file.
with open("macro_image.jpg", "wb") as f:
f.write(jpeg_data)
# Alternatively, you could decompress the data using Pillow:
# pil_image = PIL.Image.open(io.BytesIO(jpeg_data), formats=["JPEG"])
Development
Dependency management
To set up a development environment from the lock file:
- Ensure that you have micromamba installed.
- Create the environment:
$ micromamba create -n pyisyntax -f conda-lock.yml --category main --category dev
- Activate the environment:
$ micromamba activate pyisyntax
To modify pyisyntax project dependencies:
- Edit pyproject.toml.
- Update the lock file using conda-lock:
$ conda-lock lock -f pyproject.toml -p linux-64 --micromamba
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
pyisyntax-0.1.0.tar.gz
(246.1 kB
view hashes)
Built Distributions
Close
Hashes for pyisyntax-0.1.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db019dd0e384d60340f082b25a3a1be03909ad6a15ca1984958689fffbfe88e |
|
MD5 | cca8d093243139f5335617b44316e184 |
|
BLAKE2b-256 | f745c9b8d18b095138fce51200825c60b37bd43410754173f07b09b5e9b90f48 |
Close
Hashes for pyisyntax-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4296567599a6cffdb8c81ce79cc3c74fdea33ed8f1fdd661cddc577e65bbbeb |
|
MD5 | 2d34536c41687d1e02b8a88a82847c72 |
|
BLAKE2b-256 | 2e6b05e90938731686799f8ae4ae2f7af7a8cf0365171e98f5464606c8d17b5f |
Close
Hashes for pyisyntax-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2241e6f89a1d384c3cfe1df15c39241195c7d11d801bbf466b24eed00faa4b41 |
|
MD5 | 39265be797a2b117cbf99e0b829be7af |
|
BLAKE2b-256 | b1eee1e8fd129602d4f5776508d8917c52f90ec277d19d2afb9ede188db078c9 |
Close
Hashes for pyisyntax-0.1.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2064b636dd44b80c908ef40156fcec49be6c2196e9ca88d835391fb2b178e55b |
|
MD5 | f3d0e2f14a3a31ee7b81884de05faadf |
|
BLAKE2b-256 | bfa48499f55480559ac485bced124bb314faf5cf8793050ce4d7c317e039defb |
Close
Hashes for pyisyntax-0.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83f6feb8c32ceda854ee310b857cb18dbeda9d31f171634fa17708eea16846a8 |
|
MD5 | 18d875bd45da5cd4de81cd455117ee52 |
|
BLAKE2b-256 | 50a85ce5b8e800ddab0094199243e8b90b8b9552be98c48016790bb2b2223c9e |
Close
Hashes for pyisyntax-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb1412f341fcf3f7082ed52756e89d1ce4576b3f4683f5e8f85e70f88c8584f0 |
|
MD5 | e83325a1ae694b8884e79b50f847c2cd |
|
BLAKE2b-256 | 5f5804f04291f47515cddc64bd52a088b8077459236cf920ca152596b73d0691 |
Close
Hashes for pyisyntax-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2352805952183ea1d886f6bc848c7313db1fb4d65adc61d5ddd69ecdd467105 |
|
MD5 | 154cce31a146d5b4d5769ebb277ff457 |
|
BLAKE2b-256 | a7705074f6e0106a53ce2a5cfc21f921076ed620e1bfca1789cf374f618adb78 |
Close
Hashes for pyisyntax-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbf6e7762cddabd05938e2f3ac77cdaa3e7a48a0b69b94ef4b2783b801c1693f |
|
MD5 | d120037e29c1039757f6356952057920 |
|
BLAKE2b-256 | c3786f7445b27f359fe4b98b3580d2d442d86564958c399c6beda4a83d87702c |
Close
Hashes for pyisyntax-0.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d711fd1bc8e63f9ee1929802abfe72583b02c7dc549b110d424522b7d021a7 |
|
MD5 | a06c5dafaac197535e01be9c0e234c4d |
|
BLAKE2b-256 | b37ca4e34288f538d19737f7671cc73f032517daf071a8b69f12c0961c32ded2 |
Close
Hashes for pyisyntax-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cbc64ce2e1401f0a01d1bca3f554145e39ff7f5d52b45c9da06bee43efbe618 |
|
MD5 | 945e601b52a4a02d897bef51ab64061a |
|
BLAKE2b-256 | f03114a143a2e5827083ff1b7d2ca701448e877e7ccc130875d4b1523b4f5fec |
Close
Hashes for pyisyntax-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f7e3cbf9e94fcea4c2686e7ee1b76aba0ecd4d7e7fb04a47c574f2a075b00d8 |
|
MD5 | 9d288f54e1a2593ab055d5c3a5aac0bc |
|
BLAKE2b-256 | 19821cea1a050443dd06c2468aa22c88e33ec010d9878cf90ef2f49bc59cce43 |
Close
Hashes for pyisyntax-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aa5cce4f653bdd16bd2d99325051b5c0497dbc89304188e39f8c42c504d583d |
|
MD5 | 018cc96425719403e7e9ff42d0f54c67 |
|
BLAKE2b-256 | 2a50fe7e82b25f709c7c87592a7ec5b456db19802b6f0cf6914f06533e77994e |