11#ifndef PACS_ENCODING_COMPRESSION_JPEGXL_CODEC_HPP
12#define PACS_ENCODING_COMPRESSION_JPEGXL_CODEC_HPP
51 "1.2.840.10008.1.2.4.110";
55 "1.2.840.10008.1.2.4.111";
59 "1.2.840.10008.1.2.4.112";
74 bool jpeg_recompression =
false,
89 [[nodiscard]] std::string_view
name() const noexcept override;
90 [[nodiscard]]
bool is_lossy() const noexcept override;
109 std::span<const uint8_t> pixel_data,
114 std::span<const uint8_t> compressed_data,
Abstract base class for image compression codecs.
JPEG XL codec implementation (Supplement 232).
float quality_distance() const noexcept
static constexpr std::string_view kTransferSyntaxUIDJPEGRecompression
DICOM Transfer Syntax UID for JPEG XL JPEG Recompression.
codec_result decode(std::span< const uint8_t > compressed_data, const image_params ¶ms) const override
Decompresses compressed pixel data.
bool is_jpeg_recompression_mode() const noexcept
static constexpr float kDefaultQualityDistance
Default quality distance for lossy mode (1.0 = visually lossless)
std::string_view name() const noexcept override
Returns a human-readable name for the codec.
jpegxl_codec(const jpegxl_codec &)=delete
jpegxl_codec & operator=(const jpegxl_codec &)=delete
static constexpr std::string_view kTransferSyntaxUIDLossy
DICOM Transfer Syntax UID for JPEG XL (any mode)
jpegxl_codec(jpegxl_codec &&) noexcept
std::string_view transfer_syntax_uid() const noexcept override
Returns the Transfer Syntax UID supported by this codec.
bool is_lossless_mode() const noexcept
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.
bool is_lossy() const noexcept override
Checks if this codec produces lossy compression.
static constexpr std::string_view kTransferSyntaxUIDLossless
DICOM Transfer Syntax UID for JPEG XL Lossless.
jpegxl_codec(bool lossless=true, bool jpeg_recompression=false, float quality_distance=kDefaultQualityDistance)
Constructs a JPEG XL codec instance.
codec_result encode(std::span< const uint8_t > pixel_data, const image_params ¶ms, const compression_options &options={}) const override
Compresses uncompressed pixel data.
Compression quality settings for lossy codecs.
Parameters describing image pixel data.