11#ifndef PACS_ENCODING_COMPRESSION_FRAME_DEFLATE_CODEC_HPP
12#define PACS_ENCODING_COMPRESSION_FRAME_DEFLATE_CODEC_HPP
57 "1.2.840.10008.1.2.11";
89 [[nodiscard]] std::string_view
name() const noexcept override;
90 [[nodiscard]]
bool is_lossy() const noexcept override;
122 std::span<const uint8_t> pixel_data,
134 std::span<const uint8_t> compressed_data,
Abstract base class for image compression codecs.
Frame-level Deflate codec implementation (Supplement 244).
static constexpr int kMinCompressionLevel
Minimum zlib compression level (fastest)
int compression_level() const noexcept
Gets the current zlib compression level.
static constexpr int kDefaultCompressionLevel
Default zlib compression level (6 = balanced speed/ratio)
static constexpr int kMaxCompressionLevel
Maximum zlib compression level (best compression)
std::string_view transfer_syntax_uid() const noexcept override
Returns the Transfer Syntax UID supported by this codec.
frame_deflate_codec(int compression_level=kDefaultCompressionLevel)
Constructs a Frame Deflate codec instance.
frame_deflate_codec(const frame_deflate_codec &)=delete
bool can_encode(const image_params ¶ms) const noexcept override
Checks if this codec supports the given image parameters.
bool is_lossy() const noexcept override
Checks if this codec produces lossy compression.
std::string_view name() const noexcept override
Returns a human-readable name for the codec.
frame_deflate_codec(frame_deflate_codec &&) noexcept
static constexpr std::string_view kTransferSyntaxUID
DICOM Transfer Syntax UID for Frame Deflate.
frame_deflate_codec & operator=(const frame_deflate_codec &)=delete
codec_result encode(std::span< const uint8_t > pixel_data, const image_params ¶ms, const compression_options &options={}) const override
Compresses pixel data using zlib deflate.
~frame_deflate_codec() override
bool can_decode(const image_params ¶ms) const noexcept override
Checks if this codec can decode data with given parameters.
codec_result decode(std::span< const uint8_t > compressed_data, const image_params ¶ms) const override
Decompresses deflate-compressed pixel data.
Compression quality settings for lossy codecs.
Parameters describing image pixel data.