CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
working_image_cpu_halide.h
Go to the documentation of this file.
1
8#pragma once
12
13#include <memory>
14#include <expected>
15
16namespace CaptureMoment::Core {
17
18namespace ImageProcessing {
28public:
31
32 ~WorkingImageCPU_Halide() override = default;
33
38 [[nodiscard]] bool bindView(const ImageView& view) override;
39
44 [[nodiscard]] bool isValid() const override { return WorkingImageCPU::isValid() && isHalideBufferValid(); };
45
50 [[nodiscard]] bool isOriginalHalideBufferValid() const { return m_halide_original_buffer.defined(); }
51
56 [[nodiscard]] Halide::Buffer<float>& getOriginalHalideBuffer() { return m_halide_original_buffer; }
57
58private:
59 Halide::Buffer<float> m_halide_original_buffer;
60};
61
62} // namespace ImageProcessing
63
64} // namespace CaptureMoment::Core
Updates the internal image data from a CPU-based ImageRegion.
bool isValid() const override
Checks if the CPU view AND the Halide buffer are valid.
bool bindView(const ImageView &view) override
Binds the view and initializes the zero-copy Halide buffer.
Halide::Buffer< float > & getOriginalHalideBuffer()
Returns a reference to the Halide buffer for original data (on CPU).
Class extending IWorkingImageHardware for CPU-specific implementations. This class defines the base c...
bool isValid() const override
Checks if the image data is valid.
Base class providing common Halide buffer functionality for image processing.
bool isHalideBufferValid() const noexcept
Checks if the Halide buffer is defined.
Lightweight, non-owning view over image memory and its geometry.
@ ImageProcessing
Errors related to Image Processing, GPU, or Memory.
Manages the lifecycle of a single IWorkingImage instance.
Represents a zero-copy window over contiguous image memory.
Definition image_view.h:26
Image working buffers stored on the CPU.
Base class for Halide-based working image implementations.
CaptureMoment — footer