Skip to content

Commit

Permalink
Fix mistakes in segmentation compression methods docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CPBridge committed Jun 14, 2023
1 parent 2c3cbce commit a3f2893
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 5 additions & 8 deletions docs/seg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,11 @@ retrieving individual frames from segmentation images in which each frame
size is not divisible by 8 becomes problematic. No further compression may be
applied to frames of ``"BINARY"`` segmentation images.

Pixels in ``"FRACTIONAL"`` segmentation images may be compressed in the same
manner as other DICOM images. However, since lossy compression methods such as
standard JPEG are not designed to work with these sorts of images, we strongly
advise using only lossless compression methods with Segmentation images.
Currently *highdicom* supports the following compressed transfer syntaxes when
creating ``"FRACTIONAL"`` segmentation images: ``"RLELossless"`` (lossless),
``"JPEG2000Lossless"`` (lossless), ``"JPEGBaseline8Bit"`` (lossy, not
recommended).
Pixels in ``"FRACTIONAL"`` segmentation images may be compressed using one of
the lossless compression methods available within DICOM. Currently *highdicom*
supports the following compressed transfer syntaxes when creating
``"FRACTIONAL"`` segmentation images: ``"RLELossless"``,
``"JPEG2000Lossless"``, and ``"JPEGLSLossless"``.

Note that there may be advantages to using ``"FRACTIONAL"`` segmentations to
store segmentation images that are binary in nature (i.e. only taking values 0
Expand Down
5 changes: 3 additions & 2 deletions src/highdicom/seg/sop.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,9 @@ def __init__(
data elements. The following lossless compressed transfer syntaxes
are supported for encapsulated format encoding in case of
FRACTIONAL segmentation type:
RLE Lossless (``"1.2.840.10008.1.2.5"``) and
JPEG 2000 Lossless (``"1.2.840.10008.1.2.4.90"``).
RLE Lossless (``"1.2.840.10008.1.2.5"``),
JPEG 2000 Lossless (``"1.2.840.10008.1.2.4.90"``), and
JPEG LS Lossless (``"1.2.840.10008.1.2.4.00"``).
pixel_measures: Union[highdicom.PixelMeasures, None], optional
Physical spacing of image pixels in `pixel_array`.
If ``None``, it will be assumed that the segmentation image has the
Expand Down

0 comments on commit a3f2893

Please sign in to comment.