A Python wrapper for openjpeg, with a focus on use as a plugin for for pylibjpeg
Project description
pylibjpeg-openjpeg
A Python 3.7+ wrapper for openjpeg, with a focus on use as a plugin for pylibjpeg.
Linux, OSX and Windows are all supported.
Installation
Dependencies
Installing the current release
python -m pip install -U pylibjpeg-openjpeg
Installing the development version
Make sure Python, Git and CMake are installed. For Windows, you also need to install Microsoft's C++ Build Tools.
git clone --recurse-submodules https://github.com/pydicom/pylibjpeg-openjpeg
python -m pip install pylibjpeg-openjpeg
Supported JPEG Formats
Decoding
ISO/IEC Standard | ITU Equivalent | JPEG Format |
---|---|---|
15444-1 | T.800 | JPEG 2000 |
Encoding
Encoding of JPEG 2000 images is not currently supported
Transfer Syntaxes
UID | Description |
---|---|
1.2.840.10008.1.2.4.90 | JPEG 2000 Image Compression (Lossless Only) |
1.2.840.10008.1.2.4.91 | JPEG 2000 Image Compression |
Usage
With pylibjpeg and pydicom
from pydicom import dcmread
from pydicom.data import get_testdata_file
ds = dcmread(get_testdata_file('JPEG2000.dcm'))
arr = ds.pixel_array
Standalone JPEG decoding
You can also decode JPEG 2000 images to a numpy ndarray:
from openjpeg import decode
with open('filename.j2k', 'rb') as f:
# Returns a numpy array
arr = decode(f)
# Or simply...
arr = decode('filename.j2k')
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
pylibjpeg-openjpeg-1.2.1.tar.gz
(325.6 kB
view hashes)
Built Distributions
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac4104c3159fb64f1f92d9bf9c4ce0d7d84aa8e91b035a9e196b13998c2c1162 |
|
MD5 | bfbbc69c179e1e340ed7fdde973e83c7 |
|
BLAKE2b-256 | ed66f5f17a3f48e57c84116a0c849883b0ce5271158f6bedb2f49dadcb09f2ec |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4e031d12425e4ccc64bb9c625e305a3bd86dd093229f07cfadb84f84ec18f3d |
|
MD5 | 219b888ac8fcff461d9a13d2fb7fdf0c |
|
BLAKE2b-256 | da9feb1912ac4de4a765adbeae7a42f3cc7c18d4a54b9495663786ff4463c796 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 280eb85646a9e082d8e691e821c7b909d38b2c26646195d824c7bb526b88c3cc |
|
MD5 | 10cfde23a9af87fb9f960c0be9e217d0 |
|
BLAKE2b-256 | 8b195d218dcb40a4aa855033fce36f34daad76bf25ecdbc837bdef0a306d1fac |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdca7d660ed125865661343de32e8c66611b78138efa52206040a1456759e44c |
|
MD5 | 840b3befbd738663d85ebc0651cee9be |
|
BLAKE2b-256 | c89769370129715996c04da9204f497fec0f7b18032eec060a8992b99d35eda7 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38ee7ae92c9688b11939969946011c0b96cfd3bcdb0d73e7a0e55844ce9a6509 |
|
MD5 | 333f3d1c4f26e3cedf272bba59e78046 |
|
BLAKE2b-256 | 06a1bf269ec70f0dafecf91737f985b30405fa6e65da604c451d6579b12bebe9 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8da92c40ffe81cbc509ec5eefdf4fe83fcf44158097db7ed1a14e4f345a8a610 |
|
MD5 | 817c1faad36ccd9ec8b03aaa0627de6d |
|
BLAKE2b-256 | 5e0d30b2fdaca92ac26e4a4906c2aa36d330fb2e6cf135084a7575212aeb9315 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2213d0c0b7feb4931644c413473bbce3cbdf58302019cebc92f60b4a2cecfad |
|
MD5 | 0704397cd7164c680b39792275c73b46 |
|
BLAKE2b-256 | 60a0da370972fd57d242d38011fee3d627f294928e34d97f07d807e799879cfc |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f08b18c879b39fcd683429a1d895b09fd9415cc06e8c828bc13bad690a33de7f |
|
MD5 | 94eadf6f2317e27ff9510cc37ae0d9f1 |
|
BLAKE2b-256 | 8398a343690fb11c34cd8a9315aa7515d856feaa65d180d66305eec70718bba5 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7de9df08233e0c219131f7d49278a3c0a2844e7fca85243282599da42a147ea |
|
MD5 | 4f9ae8fe36562c1d45214a37ad3e7a61 |
|
BLAKE2b-256 | 386bd31dd2d19cf968c707cd68a4d92941cda13524d39c58848039760f16e1ad |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b213fb4c49367ae84e89c65f55f44bfb9cd841d25ec037578ae946fe75a6efd1 |
|
MD5 | 93a9093a546f2a6796c0bb7933aad986 |
|
BLAKE2b-256 | 763e68d766d62a1d176384536cbbb002b07f1d187d09f0b74ce3902455f6e0e2 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 685a141926d3a6f1546b6fa19b627868342d500f0d5ddbe1839d54f940b1db4a |
|
MD5 | 6aab13d4bad4dbc21101e7b7018924a9 |
|
BLAKE2b-256 | 08b9c7cd4b5892f29821b7d6bda1eae04c5d8fe1b8ca8251485d13d89da82c9d |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5764fdd819f747a67c3b3909b821910c3af7e5e73c61605d3ef5550758b63160 |
|
MD5 | 702c3a71cd1dc5540c99553d249c6c38 |
|
BLAKE2b-256 | ef6d1186f671078230e8e951cc666a258e32b9a766f3806d3857dd86713ab839 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31d4b384520a10967443ea1e26e91eb0a193e000f4a4dcbfe0d1981e555ab70d |
|
MD5 | a4d8b9caba9898665caf799720174f1b |
|
BLAKE2b-256 | 8a1ac5e80705364f5afed4435a6e29493b3f819c8f759cb6512e36a3517770da |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 197723225bf8bef459d5542e8759b43019c75149e541ccc7b4c41910040cfa7c |
|
MD5 | 3d45f89d3119863ef2102dd54fa57b58 |
|
BLAKE2b-256 | 638b4c96fc5775d0db8c0eae2decadd1f7d6b399ebe22d34ae200b6fd8608fc1 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5183d88001da865717f9dffd1b8fde10652fea4ea4a2b4bb0caa8cc3e66606a |
|
MD5 | 4cb5bc82e1786760dc3f81ecb816b2e6 |
|
BLAKE2b-256 | 793901cc5d1b9062e8c95fdd66c7a809cb6c28f5636f5c4a05eaa67f90613393 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c14d66ea0e5a1dedb194e2a73e3cc8c1c68b9e3dbd8b77db40413d178cb9aca |
|
MD5 | 9120ff0d24d2e59406ad13689dd25646 |
|
BLAKE2b-256 | 652d6b5c28833e202a0c5c157e1c06436b40325f27c6c8f60ecd37e3dad16503 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5217937b152b87c7c8b12435fbe5d397e839a16706547c4b0401f48461549473 |
|
MD5 | 7d00f91802159ba03bddb4c35127e645 |
|
BLAKE2b-256 | b5b7297ab95f6567d8b30638360feb5497b9642a636c4c583a4448510a6b9fbb |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 135a2efadb9e96744b9ce5a40fe178a759d540c56a7f2d895d003dc1129157f7 |
|
MD5 | 4175267534c69637536dc2f643b75f8d |
|
BLAKE2b-256 | 8dd25dea565f9492717347c936f81297c33ae8e2794f905b236780aae6ae90f2 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 145dfe1e55bc3e640c49da4b9043c358c6536143d770ad85f2175d7890cd4414 |
|
MD5 | b003a9c2da535da455c6ed186475f938 |
|
BLAKE2b-256 | af7affb7c641eaaf49ed485175872d4a13d6f3c7d0842708b367ca86c13ced4d |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf02aa161b54780d844e6bbd2132e8159c9d93cf656c63e7550d93e56a9e7fe2 |
|
MD5 | d9fb5adc58af77b4722ebf9aed682269 |
|
BLAKE2b-256 | acf6e0f2d0cacf27534f3a84863852248c361a136aa6f1dd1a256a249659f3e0 |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bafd1c60b5742eecd70e2f1ec208f70458a929bfb234ee29c44b3e1335d6aac |
|
MD5 | bd6630a15631c7df232462fa2e7c1d0d |
|
BLAKE2b-256 | af37d0f8115660ff61a317d46974fdcb13fc40d6b1b2de26d99b64452d8da3ef |
Close
Hashes for pylibjpeg_openjpeg-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4431b14f9522b7d644a712995c336b93468bed46598349a6989c8b79cfc4e277 |
|
MD5 | 3b656c7eaf90635214abba84a1106cad |
|
BLAKE2b-256 | dd59951c03b462178189c47bee327053460bd7815863297c334097fe0749cf8c |