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.3.0.tar.gz
(362.5 kB
view hashes)
Built Distributions
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1da24def6dcda463e53304bff323c727ea71cb882c390bf81c479d2d31269dc |
|
MD5 | 8ad26ec56f93d9d6eaf9286fc0d52f7d |
|
BLAKE2b-256 | b0b8c449e8864bd7afed6f8e05cf402fb6fa12f831ecfb258d044be4feb42ac3 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f360f9467e0c82266cd82dd9de2396477aebd149af769150d61c8bfd5cd7f60 |
|
MD5 | 928d79276b387a4f4e05f83cf9008090 |
|
BLAKE2b-256 | b4705d2a0c99afda8b8d15719dcb2eff0d496c9225b10b2465ea158f915fbc73 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffc6a2b9e0a8d5a284020418528c521a94265ca9a512fa9d007e6b59808c918 |
|
MD5 | 247f94bc1af62ac7badef6b71c9bd7e8 |
|
BLAKE2b-256 | 62de9c9e17ebdf1ff4b8cd922c1c7b6714cc22af9382dfb9a9b4beb8277f304b |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6defe9c4b5fd143e5ccb9f468e8a27ad9084ba73edb8231519a3c177263e57ad |
|
MD5 | c10813fd2c70a977be2fc32d8413d6f4 |
|
BLAKE2b-256 | 9204e48e8ecc6e264992a6dfdab6bfc3088eff55b0234b0ad1cb6dd624da5e5c |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd7d0d6c16a53f98f17826d239062a5a16dace0eeac3810ccc79e3027cae3beb |
|
MD5 | 7be8a10baa67a77efae3cf0d475ccc98 |
|
BLAKE2b-256 | b82989d0c252d0c3dafe19db2410902e6207b0e2d30c128205c6d215bfc9a676 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39e278da08afd05173c1ee8bebcc92d92ef485cb38cf47096594e409dacf4c9f |
|
MD5 | 59ab0ef40e168af9343ff7a4df8d7bb8 |
|
BLAKE2b-256 | 3cb5ce3eab9481c00d282b5eafc41d85b9b706e580f524eb5067b2d9cf95554b |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42517e28ab68054976a657990e158e001fbda195f3d2da025af39aeb218cef42 |
|
MD5 | 66094f6b251f8df847420643c9bfea29 |
|
BLAKE2b-256 | f8cedf166552af0f151ca3a5a04ba73ea3b2c1dfde7211c7444723662ab364c0 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf6c959ad844a46b71576d8123e956680992d6b975280e375e991cd7efc61a02 |
|
MD5 | 7bf53792576af4f6d94aa6b35a9e8ee8 |
|
BLAKE2b-256 | 4c0a4dd0c6224ed498eae8a6e46c41dffb370c65e7535f42cc3fe14cfce8d871 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e96e5312d92c774b7904fadd78f21c11fe0c67be141749a7ef352cbe642eb8d |
|
MD5 | e2fbeed1466e2fb5b0a87543bd52c8d0 |
|
BLAKE2b-256 | 9b2e4f33d64199bb72b835749eb219fd215f676750a1610e84cc06fabe113bb2 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20574d5b6f7b7539580cb9e9f0a1b0826ac9445cf8e339b833a5a26b13665188 |
|
MD5 | ce240aa7c2558eb73ff2c80b4f149ef3 |
|
BLAKE2b-256 | 8b973bf485bd7e4bf32f64d63b40e06fc7576e0734c3085b417c8cc5a685bfa0 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b80e7b8d690eb8f6dc366960dc61e2b9ff9b06fef530a8008813382dd01ff998 |
|
MD5 | cde1262b9a07da17b12328fc38e5bbe9 |
|
BLAKE2b-256 | 62566a4275f6effcefffcc8dfbdef85a9eda54386c42f2e6f84fd6f6394a8722 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 695d43529ba9cb628e86e105e51bec7319d4149e847609006c113ec072488f49 |
|
MD5 | 0b53bcd19dd4bbb724b39257f1ca734a |
|
BLAKE2b-256 | 8e9ebee9de323a6411705ca41b2682e7c946d933445b1f37032bd3f6df1558a8 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab5595a3f1d02ae6ad72bb04adf666549be41fcfdbf2b07a93cc89fb2d41207e |
|
MD5 | 4850f9bb958fe8e62e093660059886e6 |
|
BLAKE2b-256 | 490bdd8e33e9c7c476ee7b03ec056d6dd28cb9b678750dc0f0d9704265982a00 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a19d3af1d190002165fe2c20ac0867a59477f6c3b327a1f67d0a057c6c830fcb |
|
MD5 | 221bca3c18c4ed7f53d1a80d6f982d05 |
|
BLAKE2b-256 | d362132fd885d5d4c585600bac3b8e63c8ffcc8caff4fbcf092c7b0dbc74a5d2 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d43a4f5dd97ad9f23b7cde837157de102b9894072ead365ab08c9bb0d8fa05e |
|
MD5 | 34571c48c904c02de3b526de9aabd65e |
|
BLAKE2b-256 | 5c15a14cab45f2dc1112f31ec15f03fd26c3567f64582a55fde2a6eb59d69605 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e739ded35740046b479052f6f471e4247fe8e4ada01558a64111b878429f522 |
|
MD5 | 9c61e5e45c2cfa561785592e7aea8df3 |
|
BLAKE2b-256 | 3c650ec5c28ba7810b4e08084e03b3b994d825fd6d3c49d4d6848903a9a74ef1 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38383d91e29228bc59f51eb6ff6ddf38f357878f442ad255765b62e1208af852 |
|
MD5 | 94044d4210f7f8594167047ad503b06b |
|
BLAKE2b-256 | 1e71b6e022f01503c4cc27e621b534c88aeab9c2f7351b7c67af2369c0a039aa |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c8b425929d9be5b743621416aef0604b200133ebd54b1da0f10f35276716d64 |
|
MD5 | 8c22519f417b57a02a1c63910efe21a8 |
|
BLAKE2b-256 | a5ec64e9ccad4d12ed2d9da5e21c8701c61b962c7bbc75522786d994043a4b6e |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f84afd0ba4f59f76bc0fc8dedb18fb5c601a0ef3a983eb40d6a7abe5bbe02af |
|
MD5 | 20862471ab483a04b9c76948ddc8d37b |
|
BLAKE2b-256 | b69053e8b489333b0007b52fdd5be61739fad8c1c424e0a380ac90deebd921cc |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91be1a99fbd7733806f775688cd6eef28b4f99918c9aba4342a29e25d8b414ee |
|
MD5 | 6acf9999f50f78853c952a1c108f9407 |
|
BLAKE2b-256 | c7bd6118350fb8c9ea59e0d967b4c5667b7c0a0834ccfd9d923b9e16ffcadb5b |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26903a4c2080dc4c07a45be8500be443e51144a380f6f2e326926ac059b61bad |
|
MD5 | 5cc6bcc517729d11bfb039db6dcdb2c9 |
|
BLAKE2b-256 | 89c07d70f6b0cf2b9502c5ff004b1c7c175ba055ee8d2640d1cbd6ad07099c47 |
Close
Hashes for pylibjpeg_openjpeg-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2807c07fdfaddeaf6d8d0ab494661fbb2a14027ea5223df31a9ee1106c3ff782 |
|
MD5 | 16cb5e1706e4e1081309881a0d686721 |
|
BLAKE2b-256 | e4fe09e855a2b0e3c67fdda93bd6419365332c930319f632050162e5a4370234 |