56 [[nodiscard]]
virtual std::expected<void, ErrorHandling::CoreError>
loadFile(std::string_view path) = 0;
67 [[nodiscard]]
virtual bool isLoaded()
const = 0;
86 [[nodiscard]] virtual Common::ImageDim
height() const noexcept = 0;
92 [[nodiscard]] virtual Common::ImageChan
channels() const noexcept = 0;
109 Common::ImageDim x, Common::ImageDim y, Common::ImageDim
width, Common::ImageDim
height
122 [[nodiscard]] virtual std::expected<
void,
ErrorHandling::CoreError>
setTile(const Common::ImageRegion& tile) = 0;
129 [[nodiscard]] virtual std::optional<std::
string>
getMetadata(std::string_view key) const = 0;
Abstract interface for managing image sources.
virtual Common::ImageDim height() const noexcept=0
Retrieves the height (in pixels) of the source image.
virtual std::string getImageSourcePath() const =0
Gets the path of the image source.
virtual std::expected< void, ErrorHandling::CoreError > loadFile(std::string_view path)=0
Loads an image file from the specified path.
virtual Common::ImageChan channels() const noexcept=0
Gets the number of channels of the internal buffer.
virtual std::expected< void, ErrorHandling::CoreError > setTile(const Common::ImageRegion &tile)=0
Writes pixel data from a tile back into the image buffer.
virtual std::optional< std::string > getMetadata(std::string_view key) const =0
Retrieves a specific metadata field from the source image.
virtual bool isLoaded() const =0
Checks if an image is currently loaded.
virtual ~ISourceManager()=default
virtual std::expected< std::unique_ptr< Common::ImageRegion >, ErrorHandling::CoreError > getTile(Common::ImageDim x, Common::ImageDim y, Common::ImageDim width, Common::ImageDim height)=0
Extracts a rectangular region (tile) of pixels from the image.
virtual Common::ImageDim width() const noexcept=0
Retrieves the width (in pixels) of the source image.
virtual void unload()=0
Unloads the currently loaded image and frees resources.
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 ImageDim
Type for image dimensions (width, height).
Manages the lifecycle of a single IWorkingImage instance.
Contains the error handling infrastructure for the Core library.