A Python wrapper for openjpeg, with a focus on use as a plugin for for pylibjpeg
Project description
pylibjpeg-openjpeg
A Python 3.8+ 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 |
1.2.840.10008.1.2.4.201 | High-Throughput JPEG 2000 Image Compression (Lossless Only) |
1.2.840.10008.1.2.4.202 | High-Throughput JPEG 2000 with RPCL Options Image Compression (Lossless Only) |
1.2.840.10008.1.2.4.203 | High-Throughput 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
Built Distributions
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b7788e6c862614b86c2652797a392f6261717ae4dfa5ab2ca9eddb147ae762 |
|
MD5 | 859877a66434ae96206d52865523a2f6 |
|
BLAKE2b-256 | 10b39b61a58a6af1a61c2faed85f3c9a6351de69227a7c816727a976e2e430cb |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c929d306c6cb68a10ba0397aa6c6a280a3864d768fc3a0702156c804838c8e8d |
|
MD5 | f92fbde47b476e14e6e7df881050b65c |
|
BLAKE2b-256 | 8740a219f8d582185b0f52e958fb227aa95d2c4a793f603c95c395516fdd3992 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 495b0f8b5ac5d10431b142638abc8d4aa13c32dd99122c19ef580f12a5502ff8 |
|
MD5 | 7da330c1546099172f4b412173cfbf3a |
|
BLAKE2b-256 | 962b7e208979ae3e1c0a6a4b8096fe79e350fc53c0e0b0f9f0bdb612217a009b |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15d4825ae4c76775624ae39a0ff705a61c99d5d8a4708183fb4977c4ae65f88f |
|
MD5 | 0e264d4f5985a8cc54c04cb314377f3f |
|
BLAKE2b-256 | 1ad063c9066357e0cfbb45d192f173ad61997f185b2d216e67ea8c2eba671e95 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4578b4255e9a7b8a24ed2ef78f7297ae7a851e08250060566872dda7e64df6a |
|
MD5 | fc478a0e6efc08f04273f6b37fea24e3 |
|
BLAKE2b-256 | 896cdbde08c7cd4e35c228d6a9f1e41ea17dc19caf28d92df87d447f90c0bdfc |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed01b2bb28577460f5537a918dd4f27f0fbcf9d46b231da104c5ecb9fc0d7dff |
|
MD5 | 0d302409ca1ce5f84947560b151bbb99 |
|
BLAKE2b-256 | 795d8ce8657b2a63ff589c504a77be2ef93af195485b3df7067169890438695b |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbaba33e192e41ce4c0980130650d9e13105fbedc713a04eab30adf2f0286f47 |
|
MD5 | 2281b693f12ae39f251af31a92275101 |
|
BLAKE2b-256 | f3a4d0b963011ad6a5cfa2bdaaf72750d65f64d4e779a0af989a1fb75e587d0a |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae618639a5818317219a802dbaf147b7844de5ec2c7a25be310287e68fe56447 |
|
MD5 | 5256ba6d3ef0b5f323d8b3b22cd1d432 |
|
BLAKE2b-256 | 9e21a8d6e08ed9952c089e845c40942cbba49d198d28a43bddf5604b83b644d9 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ff2ee34000b1b60664c0479d6679930c62e1d8633ae7036d015f22537c0ea4e |
|
MD5 | ebd627a6e143f5bd5a7e8b7c2b9edecc |
|
BLAKE2b-256 | a10940cfcbb3672bbec98e0a7ad1c4cfb69294f44433027dc5e9491a451f72b7 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74acf277db233553bb27ab8b788998a59fcc74e45ec2bbd361f057fc779d21e6 |
|
MD5 | 2db4533144a5de5fbf1cc0756b50247b |
|
BLAKE2b-256 | c86bd2efc0997780b62db15eb0b2886b482f173476882ca09ff58bcb11cf1403 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014684dba5ac941b293f164ffe95052cf7a914bf2c14dc0a289cd764f66b2e10 |
|
MD5 | d7f3fae9049ab2b9951dea165eeabdc1 |
|
BLAKE2b-256 | 8e0f21b6c26acb62ee6013e19009739aeb710ffb0ac0840fd09ddbe36b54b5d6 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a94689738af873ad63496324d72e5e6e99be83496dc7b418b4122d9dd521c7b8 |
|
MD5 | f4513573453f94efa0476d2647ca4f19 |
|
BLAKE2b-256 | 664208297b3bccc2849fda00f5acbf0476d07d0a19f1535991ae6d2a039dfae9 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4ff18238eead439dffa61024a14336ca54dd64d9d74098fef6d4fc21d080763 |
|
MD5 | bd9dbf6d348885720f06c2490a0b4427 |
|
BLAKE2b-256 | a4bdd7d3dc40df1c1205cfa54f9122c37de122505b2045e3033210cc007e824b |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c79c2c2120e650fe5c09c0f16806140144d90b6b1510bd5bb5cdb8dcc7308ea9 |
|
MD5 | 885786db5856dd1cba9f0e25fa0211b7 |
|
BLAKE2b-256 | c112cf36e8d6d71db5af8430a27fa0ff9d9f4c8beeb3787fed8308c626d6eacc |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 954ef995586086f2f6e29378c2174e521f034d630a958b2fda546b65cbbcb02b |
|
MD5 | 8896e1b0eaf88037b51304d06389210c |
|
BLAKE2b-256 | 95bb862fa15f412653a3babdab935bbeb48fabcb8105bb634fa5163e11eea743 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a800a97174d8a27aaa22b308b560d3e37b76debc943e2fa41d112947c7108c0 |
|
MD5 | 5848a55007cf82b1c7c7f0f03706ec26 |
|
BLAKE2b-256 | 3a8ac4b19bdc26cecd52a5958a6bed53762c0000470409b7adcbef27df214a9a |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16e0f2f878f83aeaff514cea36b2c38fdc729c6323f9581c6a8bb57c13b08d3a |
|
MD5 | 4d0df97f61c9b18c0f340c88c8c83e79 |
|
BLAKE2b-256 | fafc8134a0ac71a5d1427f4e2f89ad7fb4dd2c4f0b13e66e7567bac7bf65ad51 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62fd3fed95e2b9e1e0050e473a555b33bd046e1a30c94980c5afbe34bbd261cf |
|
MD5 | b55215340c5c48791dcf986441783645 |
|
BLAKE2b-256 | 315c87dec9223fead3eed50a0d8c8eb22286c3c99fc6ad18f8efb80e616ee896 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 825662f1b71b38e997e74d23f2386f1d364e4ac75392ecc24bb8b2d8bf3f4a3c |
|
MD5 | 603ae09f4e06133a9bc37d3c39e4cbcd |
|
BLAKE2b-256 | 8d12bf501d96b78e089081fb497848d124f2f1a25f61ab748f7f10d041828e94 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79df9491ab4f8450f8a79e62ceb4e38199ec3fe8814844946f31bb9617b32e27 |
|
MD5 | 168f4982e2f3839ed432ac35d5967e5d |
|
BLAKE2b-256 | 8ecc0f3e3d4756d38a68ade88ecc501d16a3a615320e0c877d75391fdbf8c8b0 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef05da64b989fe0c7a2ea44ba014e44ae6a59f4e214f45cab01d3b426a829d8 |
|
MD5 | a58cea17748d22b9d6eeb1ca47eb90be |
|
BLAKE2b-256 | a2ae2a1d351c1bbb6ccd87f9e52ab124305b9000bd280ddc2d5574ea18d64215 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b95ed23dd6b5f9b91ceece88af792b49add3802c5820cd7ec4c186ec534c7a7 |
|
MD5 | 0d4f80ee334f1c99c32c3054c3ba80d4 |
|
BLAKE2b-256 | 11980689e1c7319c68ff9df72877f60e979fea4b766729f84571049d4c2964e2 |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebb11d8c48a854fca94c4ab184899de6996990334abc120808a799c0c4a08caf |
|
MD5 | d386a98353949f4d2cf40a66e9531437 |
|
BLAKE2b-256 | f0e200a63eccd0170f9d23b37fe5b88881e774c79a2abf27d716140019450a9e |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de1bdde4be11a1166f6a02039def89d18936f209cecb2ff964dee79f4915a33e |
|
MD5 | 3ab23d4b7aedc6165b2c2847f61c3e0b |
|
BLAKE2b-256 | be894049a77daa53cd95bfe74c821e02c414c7949ff3c4dc571592cd8df3554a |
Close
Hashes for pylibjpeg_openjpeg-2.0.0-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9331c98c180b8f71c2aaf028f263f45663a934bd3e3784939b0a85834312d0ba |
|
MD5 | 48a1ba07af2ea21ae0b53ce1e0773b09 |
|
BLAKE2b-256 | 363e351dcc68cd0dc244d42aeca5142b5d9b2bff8cb90e6cb62b155b0869f8eb |