|
PACS System 0.1.0
PACS DICOM system library
|
DICOM RLE Lossless codec implementation. More...
#include <rle_codec.h>


Classes | |
| class | impl |
| PIMPL implementation for rle_codec. More... | |
Public Member Functions | |
| rle_codec () | |
| Constructs an RLE codec instance. | |
| ~rle_codec () override | |
| rle_codec (const rle_codec &)=delete | |
| rle_codec & | operator= (const rle_codec &)=delete |
| rle_codec (rle_codec &&) noexcept | |
| rle_codec & | operator= (rle_codec &&) noexcept |
Codec Information | |
| std::string_view | transfer_syntax_uid () const noexcept override |
| Returns the Transfer Syntax UID supported by this codec. | |
| std::string_view | name () const noexcept override |
| Returns a human-readable name for the codec. | |
| bool | is_lossy () const noexcept override |
| Checks if this codec produces lossy compression. | |
| bool | can_encode (const image_params ¶ms) const noexcept override |
| Checks if this codec supports the given image parameters. | |
| bool | can_decode (const image_params ¶ms) const noexcept override |
| Checks if this codec can decode data with given parameters. | |
Compression Operations | |
| codec_result | encode (std::span< const uint8_t > pixel_data, const image_params ¶ms, const compression_options &options={}) const override |
| Compresses pixel data to RLE format. | |
| codec_result | decode (std::span< const uint8_t > compressed_data, const image_params ¶ms) const override |
| Decompresses RLE data. | |
Public Member Functions inherited from kcenon::pacs::encoding::compression::compression_codec | |
| virtual | ~compression_codec ()=default |
Static Public Attributes | |
| static constexpr std::string_view | kTransferSyntaxUID = "1.2.840.10008.1.2.5" |
| DICOM Transfer Syntax UID for RLE Lossless. | |
| static constexpr int | kMaxSegments = 15 |
| Maximum number of RLE segments allowed by DICOM specification. | |
| static constexpr size_t | kRLEHeaderSize = 64 |
| RLE header size (64 bytes: 16 x 4-byte offsets) | |
Private Attributes | |
| std::unique_ptr< impl > | impl_ |
Additional Inherited Members | |
Protected Member Functions inherited from kcenon::pacs::encoding::compression::compression_codec | |
| compression_codec ()=default | |
| compression_codec (const compression_codec &)=default | |
| compression_codec & | operator= (const compression_codec &)=default |
| compression_codec (compression_codec &&)=default | |
| compression_codec & | operator= (compression_codec &&)=default |
DICOM RLE Lossless codec implementation.
Implements DICOM Transfer Syntax 1.2.840.10008.1.2.5. Uses pure C++ implementation without external library dependencies.
DICOM RLE uses a segment-based approach where each sample is encoded separately, allowing for efficient lossless compression of medical images.
Supported Features:
Limitations:
Thread Safety:
Integration:
Definition at line 49 of file rle_codec.h.
| kcenon::pacs::encoding::compression::rle_codec::rle_codec | ( | ) |
Constructs an RLE codec instance.
Definition at line 543 of file rle_codec.cpp.
|
overridedefault |
|
delete |
|
defaultnoexcept |
|
nodiscardoverridevirtualnoexcept |
Checks if this codec can decode data with given parameters.
| params | The image parameters |
Implements kcenon::pacs::encoding::compression::compression_codec.
Definition at line 585 of file rle_codec.cpp.
|
nodiscardoverridevirtualnoexcept |
Checks if this codec supports the given image parameters.
| params | The image parameters to check |
Implements kcenon::pacs::encoding::compression::compression_codec.
Definition at line 563 of file rle_codec.cpp.
|
nodiscardoverridevirtual |
Decompresses RLE data.
| compressed_data | RLE compressed data (including header) |
| params | Image parameters (width, height, samples_per_pixel) |
Output format matches the original bit depth:
Implements kcenon::pacs::encoding::compression::compression_codec.
Definition at line 607 of file rle_codec.cpp.
References kcenon::pacs::encoding::compression::rle_codec::impl::decode(), and impl_.

|
nodiscardoverridevirtual |
Compresses pixel data to RLE format.
| pixel_data | Uncompressed pixel data |
| params | Image parameters |
| options | Compression options (lossless flag is ignored, always lossless) |
The output is guaranteed to be exactly reconstructible (lossless). The output includes the 64-byte RLE header followed by segment data.
For 16-bit images, each pixel is split into high byte and low byte, creating twice the number of segments as 8-bit images.
Implements kcenon::pacs::encoding::compression::compression_codec.
Definition at line 600 of file rle_codec.cpp.
References kcenon::pacs::encoding::compression::rle_codec::impl::encode(), and impl_.

|
nodiscardoverridevirtualnoexcept |
Checks if this codec produces lossy compression.
Implements kcenon::pacs::encoding::compression::compression_codec.
Definition at line 559 of file rle_codec.cpp.
|
nodiscardoverridevirtualnoexcept |
Returns a human-readable name for the codec.
Implements kcenon::pacs::encoding::compression::compression_codec.
Definition at line 555 of file rle_codec.cpp.
|
defaultnoexcept |
|
nodiscardoverridevirtualnoexcept |
Returns the Transfer Syntax UID supported by this codec.
Implements kcenon::pacs::encoding::compression::compression_codec.
Definition at line 551 of file rle_codec.cpp.
|
private |
Definition at line 125 of file rle_codec.h.
|
staticconstexpr |
Maximum number of RLE segments allowed by DICOM specification.
Definition at line 55 of file rle_codec.h.
Referenced by kcenon::pacs::encoding::compression::rle_codec::impl::decode_frame(), and kcenon::pacs::encoding::compression::rle_codec::impl::valid_for_rle().
|
staticconstexpr |
RLE header size (64 bytes: 16 x 4-byte offsets)
Definition at line 58 of file rle_codec.h.
Referenced by kcenon::pacs::encoding::compression::rle_codec::impl::decode(), and kcenon::pacs::encoding::compression::rle_codec::impl::encode_frame().
|
staticconstexpr |
DICOM Transfer Syntax UID for RLE Lossless.
Definition at line 52 of file rle_codec.h.
Referenced by kcenon::pacs::encoding::compression::codec_factory::create().