You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
2
2
## pylibjpeg-rle
3
3
4
-
A fast DICOM RLE decoding plugin for pylibjpeg, written in Rust with a Python 3.6+ wrapper.
4
+
A fast DICOM ([PackBits](https://en.wikipedia.org/wiki/PackBits)) RLE plugin for [pylibjpeg](https://github.com/pydicom/pylibjpeg)RLE decoding plugin for pylibjpeg, written in Rust with a Python 3.6+ wrapper.
5
5
6
6
Linux, OSX and Windows are all supported.
7
7
@@ -22,10 +22,10 @@ python -m setup.py develop
22
22
```
23
23
24
24
### Supported Transfer Syntaxes
25
-
#### Decoding
26
-
| UID | Description |
27
-
| --- | --- |
28
-
| 1.2.840.10008.1.2.5 | RLE Lossless |
25
+
26
+
| UID | Description | Decoding | Encoding |
27
+
| --- | --- | --- | --- |
28
+
| 1.2.840.10008.1.2.5 | RLE Lossless | Yes | No |
29
29
30
30
### Benchmarks
31
31
#### Decoding
@@ -48,10 +48,11 @@ Time per 1000 decodes, pydicom's NumPy RLE handler vs. pylibjpeg-rle
48
48
| SC_rgb_rle_32bit_2frame.dcm | 20,000 | 240,000 | 1.03 s | 0.28 s |
49
49
50
50
### Usage
51
-
#### With pylibjpeg and pydicom
51
+
#### Decoding
52
+
##### With pylibjpeg
52
53
53
54
Because pydicom defaults to the NumPy RLE decoder, you must specify the use
54
-
of pylibjpeg when decompressing:
55
+
of pylibjpeg when decompressing (**note: requires pydicom v2.2+**):
55
56
*Pixel Data*:
56
57
```python
57
58
from pydicom import dcmread
@@ -62,6 +63,7 @@ ds.decompress("pylibjpeg")
62
63
arr = ds.pixel_array
63
64
```
64
65
66
+
#### Standalone with pydicom
65
67
Alternatively you can use the included functions to decode a given dataset:
0 commit comments