A Python wrapper for openjpeg, with a focus on use as a plugin for for pylibjpeg
Project description
pylibjpeg-openjpeg
A Python 3.6+ 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.0.tar.gz
(325.6 kB
view hashes)
Built Distributions
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dca65a45bcc9de95b46060b634933b196ae887c3ccf6cb8ea0d3da09e61c8ecc |
|
MD5 | b4ab388f9770c018f1e86597e40e6530 |
|
BLAKE2b-256 | 997f59468a8a691879f7a4aa97f46e2450fd6123a0a162acaa9d5eafb642ff4f |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33c5a28f8c69ee4e2641a8ca2da493c7df675e171bfc346d8dd9537fd38f2b92 |
|
MD5 | bec782348f60edeb809d34c6565d69a8 |
|
BLAKE2b-256 | e17b4f1039d0aad615ab8b0ab01e4344933b315d087331ace0f0b2d7d40f1378 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22edc56538bc42cfb5b36281fce15d997c82af3572a9776efce761b987231b8e |
|
MD5 | 220ee03aba4bf5e8e6ed7a3a62905ddf |
|
BLAKE2b-256 | a228ad4d3d67e20775e7b9c7953728c5bd9e341fe60ffc15b890ea22dfe7b836 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d4568f2ea656c0726a0a897069f80ece0741e62f5d853c3454cf37993cc481 |
|
MD5 | 5e4e9c83be8609e05af8c35e966cea53 |
|
BLAKE2b-256 | 9e36129bd212aa881b8c54978b683c16a3b37d6f158148b69b0440b7777b655c |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45d124f41b60a2d5d31e65f34e9c4c6249c1afc82f318dc0c3fe4693331799e1 |
|
MD5 | c16bea1898850a20a39b9d73f0718f86 |
|
BLAKE2b-256 | c878b15e095046117e2f511665822da10018dfa6319780116e0d9bece8f51544 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59c705936a14c2dd181dd018a089a7303f20034af9c639ae246249825984b7dd |
|
MD5 | 574a447dcc3c110406de02183031c06e |
|
BLAKE2b-256 | 555e7dbad157a041cc6fd34abe0f18c9c75d04b6113fe751cc4a4cabf85e5685 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cded20a78041cf7a6cf3c3a311f06cad36001043d4378fc5fafa74c4dff5924f |
|
MD5 | 8c4968f09d17325125a115d946989b4d |
|
BLAKE2b-256 | 67e062594194b3127677bf49db0c986e4460abc02461906ccee4680d3ae7f7d4 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fddadd0d141a51d3b7394504c874aef2535ae9153a09f368c165478f92ae132d |
|
MD5 | 74984866ce144f924e637dbc8c3c084a |
|
BLAKE2b-256 | 87728dd74b4cfb7e65507d34353b2abfff0fdcb0b8307cafbddd51c08674661f |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 442232e8ab77580ebe3650aef4368bdc76bce67d8cf63a3c7b98aa533e4d5067 |
|
MD5 | 4a03e74fa852408c1f994ac86f0de9e9 |
|
BLAKE2b-256 | f362b43e0fa6d5d01ed28763272023f9c172298520d6b4915b4752b36f88bdb2 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd1b90c3ba4005407900f39af7988ba80d7fd1e9e3078407da6b0d3740c2813c |
|
MD5 | 3f3e51fedb183c2aa0066393f143a452 |
|
BLAKE2b-256 | 9006c1ac878d2bffc69cb7c5468e2c35cfad609cdb27cf6dd14a0abcd66fb1eb |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25d99be3ffc486e1eea1a3b448ab3349f435f7ffa4bd1be830660d0780da0e14 |
|
MD5 | 73ab47078b14e71945e28daa2f52e239 |
|
BLAKE2b-256 | ba86652a0c65fb3b3fed8d6c2288368c10a756620e135e062e6bdebd39488439 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6864bcd87117fbc43e84b6f530829cc04e0ac24311e6c11a3b28e9f5cdaa8c |
|
MD5 | 059dc2651e826fef6c148cfc46b847f0 |
|
BLAKE2b-256 | 77469b6932e0bc1fde91de21cfd95fc2217a6a778d7094e2335665308080c4bb |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 558d96e98b311674a63e6c99421574fb6f0491130b1ce376cb978ca3e1206ec1 |
|
MD5 | 65ecff5be49317641f540a7f0c86ca88 |
|
BLAKE2b-256 | d37cf2acfe7e36845b4ea863985d6d80db909fff5671d38e98e98fcc217de17a |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f794148f11dfa155f5ec0b7124d20e02fd8c40b69dbab8cb9592bd4dcc2a24d |
|
MD5 | 9a606a3d6ac7c1f163d36e9fd595c4a8 |
|
BLAKE2b-256 | dfe79842561f1d07ed67e8f470f44f2dddae62ed63e2664febd17ceb464376f7 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a02ddcda7ac1da0d1640eb1e34aec04731fe55742b70b3160521975fe40fa4d5 |
|
MD5 | 601f0978fd470230ec4f59d9a149ff6c |
|
BLAKE2b-256 | 1921d6762a3483b4e4b5b4ea47c9bae1274df0a8a51f35dca1ea35036ead81df |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d890ba655fe12141cb551b7bb7c7f88d86abc009236b2a4ad8e26a643d693c5 |
|
MD5 | 49151d44714adb16b1062188d171a2c3 |
|
BLAKE2b-256 | 1aa2ffe24f554ab8e88c5afa24c9a2a97596679cba5d7509948de3bfcea55d57 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79257753c326e52efbfe8396324c070b5f81ea3a66aba929307907acc656a893 |
|
MD5 | afe7fad61a32469cba03c3a27319a800 |
|
BLAKE2b-256 | 8252e43a33ebf28f60600f6f9d074997f79ee42b71e749e6aaff2ff47890135e |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a27392858681612653df0017c76f5a952bf78d20e538993cdfe2c224e4567e26 |
|
MD5 | f546b742227562c499c64047deab0bef |
|
BLAKE2b-256 | 233e6b7611b6056615f71555623b76484113f21faaa6a98f71186614ce6d0ab4 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f267d920a973f5e1db64798b69c61bdbefd2c3e72a692b0a1424e261ba62a038 |
|
MD5 | a8b6418be07b6ec9190b0407333cfdb6 |
|
BLAKE2b-256 | bf05b903bd7647965757b301c9ecf923f7382f244e2fd5ce7d94ede580477de5 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15e6b93608d657a219ae2c731e4c0bdd9c964919aa1bc54a6ffa8143ff813988 |
|
MD5 | 37716ef49627a4dc628564d92be9d517 |
|
BLAKE2b-256 | e31613f8e61b5d4512bba8ce569a2c3c9d832a4f12c364241e85d0095c6b8e06 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d21a35114fa2f2a3d1a77995058c0d45f0e30a4e0d5a448b562430cc1064948 |
|
MD5 | d246ad19eafce349a5062336ecc36637 |
|
BLAKE2b-256 | b6a3cc2540551a95e36dbc8f30e976236a4de1512ccc8999e7072f644b682812 |
Close
Hashes for pylibjpeg_openjpeg-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7993cd7452b01da47bf3727d74e0987d0a261a4b6afbe5d4819f784f2d164e9b |
|
MD5 | 418ac6461a40c98f0fcf5b7513722f52 |
|
BLAKE2b-256 | b6dde3488d27c5061107c655884d2cee0be6f30f5fa5f73f32fdc35f87d44d17 |