11#ifndef PACS_ENCODING_COMPRESSION_RLE_CODEC_HPP
12#define PACS_ENCODING_COMPRESSION_RLE_CODEC_HPP
77 [[nodiscard]] std::string_view
name() const noexcept override;
78 [[nodiscard]]
bool is_lossy() const noexcept override;
102 std::span<const uint8_t> pixel_data,
118 std::span<const uint8_t> compressed_data,
Abstract base class for image compression codecs.
DICOM RLE Lossless codec implementation.
std::string_view name() const noexcept override
Returns a human-readable name for the codec.
bool can_encode(const image_params ¶ms) const noexcept override
Checks if this codec supports the given image parameters.
static constexpr std::string_view kTransferSyntaxUID
DICOM Transfer Syntax UID for RLE Lossless.
rle_codec()
Constructs an RLE codec instance.
rle_codec & operator=(const rle_codec &)=delete
codec_result decode(std::span< const uint8_t > compressed_data, const image_params ¶ms) const override
Decompresses RLE data.
static constexpr size_t kRLEHeaderSize
RLE header size (64 bytes: 16 x 4-byte offsets)
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.
std::unique_ptr< impl > impl_
std::string_view transfer_syntax_uid() const noexcept override
Returns the Transfer Syntax UID supported by this codec.
rle_codec(rle_codec &&) noexcept
bool can_decode(const image_params ¶ms) const noexcept override
Checks if this codec can decode data with given parameters.
static constexpr int kMaxSegments
Maximum number of RLE segments allowed by DICOM specification.
bool is_lossy() const noexcept override
Checks if this codec produces lossy compression.
rle_codec(const rle_codec &)=delete
Compression quality settings for lossy codecs.
Parameters describing image pixel data.