11#ifndef PACS_ENCODING_COMPRESSION_JPEG_LOSSLESS_CODEC_HPP
12#define PACS_ENCODING_COMPRESSION_JPEG_LOSSLESS_CODEC_HPP
87 [[nodiscard]] std::string_view
name() const noexcept override;
88 [[nodiscard]]
bool is_lossy() const noexcept override;
101 [[nodiscard]]
int predictor() const noexcept;
126 std::span<const uint8_t> pixel_data,
142 std::span<const uint8_t> compressed_data,
Abstract base class for image compression codecs.
JPEG Lossless (Process 14, Selection Value 1) codec implementation.
jpeg_lossless_codec & operator=(const jpeg_lossless_codec &)=delete
bool can_encode(const image_params ¶ms) const noexcept override
Checks if this codec supports the given image parameters.
jpeg_lossless_codec(jpeg_lossless_codec &&) noexcept
codec_result decode(std::span< const uint8_t > compressed_data, const image_params ¶ms) const override
Decompresses JPEG Lossless data.
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.
jpeg_lossless_codec(int predictor=kDefaultPredictor, int point_transform=kDefaultPointTransform)
Constructs a JPEG Lossless codec instance.
int predictor() const noexcept
Gets the current predictor selection value.
std::unique_ptr< impl > impl_
~jpeg_lossless_codec() override
int point_transform() const noexcept
Gets the current point transform value.
static constexpr int kDefaultPredictor
Default predictor selection value (1 = Ra, left neighbor prediction)
static constexpr std::string_view kTransferSyntaxUID
DICOM Transfer Syntax UID for JPEG Lossless (Process 14, Selection Value 1)
std::string_view transfer_syntax_uid() const noexcept override
Returns the Transfer Syntax UID supported by this codec.
bool can_decode(const image_params ¶ms) const noexcept override
Checks if this codec can decode data with given parameters.
codec_result encode(std::span< const uint8_t > pixel_data, const image_params ¶ms, const compression_options &options={}) const override
Compresses pixel data to JPEG Lossless format.
jpeg_lossless_codec(const jpeg_lossless_codec &)=delete
static constexpr int kDefaultPointTransform
Default point transform (0 = no scaling)
Compression quality settings for lossy codecs.
Parameters describing image pixel data.