Manages the lifecycle of a single IWorkingImage instance and its data.
~WorkingImageContext()=default
Destructor.
WorkingImageContext(const WorkingImageContext &)=delete
std::expected< std::unique_ptr< Common::ImageRegion >, ErrorHandling::CoreError > getWorkingImageAsRegion() const
Exports the WorkingImage data to CPU.
std::expected< std::unique_ptr< Common::ImageRegion >, ErrorHandling::CoreError > getDownsampled(Common::ImageDim target_width, Common::ImageDim target_height)
Downsamples the WorkingImage to the specified dimensions.
WorkingImageContext(WorkingImageContext &&)=default
std::shared_ptr< IWorkingImageHardware > getWorkingImage() noexcept
Gets the WorkingImage for processing.
void release() noexcept
Releases the managed WorkingImage.
bool prepare(std::unique_ptr< Common::ImageRegion > original_tile)
Prepares the context with a new source image.
bool isReady() const noexcept
Checks if a WorkingImage is ready for use.
void resetToOriginal()
Restores the internal working buffer to the original source data.
WorkingImageContext()=default
Default constructor.
WorkingImageContext & operator=(WorkingImageContext &&)=default
WorkingImageContext & operator=(const WorkingImageContext &)=delete