CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
working_image_data.h File Reference

Base class providing raw buffer storage and metadata for all working image implementations. More...

#include "common/image_region.h"
#include "common/error_handling/core_error.h"
#include "common/types/image_types.h"
#include <memory>
#include <expected>
#include <cstddef>
+ Include dependency graph for working_image_data.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CaptureMoment::Core::ImageProcessing::WorkingImageData
 Base class providing raw buffer storage and metadata for working images. More...
 

Namespaces

namespace  CaptureMoment
 
namespace  CaptureMoment::Core
 Manages the lifecycle of a single IWorkingImage instance.
 
namespace  CaptureMoment::Core::ImageProcessing
 

Detailed Description

Base class providing raw buffer storage and metadata for all working image implementations.

This class serves as a foundation for all WorkingImage implementations, regardless of their processing backend (CPU/GPU) or library (Halide/OpenCV/etc.). It encapsulates the common data storage and metadata required for image processing operations.

Architecture Role: This class is designed as a mixin/base class that provides:

  • Raw pixel data storage using std::unique_ptr<float[]> for efficient memory management
  • Image metadata (width, height, channels, validity state)
  • A shared initialization helper that handles allocation and copying from ImageRegion

Inheritance Hierarchy:

WorkingImageData (this class)
│
├── WorkingImageCPU : WorkingImageData
│ │
│ └── WorkingImageCPU_Halide
│
└── WorkingImageGPU : WorkingImageData
│
└── WorkingImageGPU_Halide

Error Handling: Methods use std::expected instead of exceptions for robust error reporting.

Author
CaptureMoment Team
Date
2026

Definition in file working_image_data.h.

CaptureMoment — footer