96 return std::span<const float>(m_original_data);
104 return std::span<const float>(m_data);
112 return std::span<float>(m_data);
138 [[nodiscard]]
bool isValid() const noexcept {
return m_valid; }
161 std::vector<float> m_data;
168 std::vector<float> m_original_data;
Base class providing raw buffer storage and metadata for working images.
WorkingImageData(const WorkingImageData &)=delete
std::expected< void, ErrorHandling::CoreError > initializeData(Common::ImageRegion &&source_image)
Re-initializes the internal buffer with a new ImageRegion.
WorkingImageData & operator=(const WorkingImageData &)=delete
WorkingImageData(std::unique_ptr< Common::ImageRegion > source)
Initializes the working image data from an ImageRegion.
void restoreOriginalData()
Restores the original image data.
std::span< const float > getOriginalDataSpan() const noexcept
Returns a non-owning, CONST span over the ORIGINAL pixel data.
virtual ~WorkingImageData()=default
std::span< float > getWorkingDataSpan() noexcept
Returns a non-owning, MUTABLE span over the working pixel data.
Common::ImageChan getChannels() const noexcept
Return the number of color channels in the image.
WorkingImageData(WorkingImageData &&) noexcept=default
bool isValid() const noexcept
Checks if the data buffer is valid and allocated.
Common::ImageDim getHeight() const noexcept
Return the height of the image in pixels.
Common::ImageDim getWidth() const noexcept
Return the width of the image in pixels.
std::span< const float > getWorkingDataSpan() const noexcept
Returns a non-owning, CONST span over the working pixel data.
Central error handling system for CaptureMoment Core library.
Defines the ImageRegion structure for representing pixel buffers in the CaptureMoment Core library.
Common type definitions for all image types in CaptureMoment.
std::size_t ImageSize
Type for data size (element count).
std::uint8_t ImageChan
Type for channel count.
std::size_t ImageDim
Type for image dimensions (width, height).
@ ImageProcessing
Errors related to Image Processing, GPU, or Memory.
Manages the lifecycle of a single IWorkingImage instance.
Contains the error handling infrastructure for the Core library.