CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
operation_contrast.h
Go to the documentation of this file.
1
8#pragma once
11
12namespace CaptureMoment::Core {
13
14namespace Operations {
34{
35public:
36 // --- Metadata ---
37 [[nodiscard]] OperationType type() const override { return OperationType::Contrast; }
38 [[nodiscard]] const char* name() const override { return "Contrast"; }
39
40 // --- Range Access (via the centralized ranges) ---
46
52
58
84 [[nodiscard]] Halide::Func appendToFusedPipeline(
85 const Halide::Func& input_func,
86 const Halide::Var& x,
87 const Halide::Var& y,
88 const Halide::Var& c,
89 const Halide::Param<float>& param
90 ) const override;
91};
92
93} // namespace Operations
94
95} // namespace CaptureMoment::Core
Interface for providing the Halide fusion logic of an operation.
Adjusts the contrast of an image region.
static constexpr float DEFAULT_CONTRAST_VALUE
Default contrast value. Defined by OperationRanges::getContrastDefaultValue().
const char * name() const override
Gets the constant name of the operation.
OperationType type() const override
Gets the unique type identifier of the operation.
Halide::Func appendToFusedPipeline(const Halide::Func &input_func, const Halide::Var &x, const Halide::Var &y, const Halide::Var &c, const Halide::Param< float > &param) const override
Appends this operation's logic to a fused Halide pipeline. This method is used by the PipelineBuilder...
static constexpr float MIN_CONTRAST_VALUE
Minimum allowed contrast value. Defined by OperationRanges::getContrastMinValue().
static constexpr float MAX_CONTRAST_VALUE
Maximum allowed contrast value. Defined by OperationRanges::getContrastMaxValue().
Interface for providing the Halide fusion logic of an operation.
OperationType
Identifies the type of an image processing operation.
@ Contrast
Contrast adjustment (Multiplicative around a midpoint). Expands or compresses the dynamic range aroun...
Manages the lifecycle of a single IWorkingImage instance.
Declaration of the OperationRanges struct.
static consteval float getContrastMinValue()
Gets the minimum allowed value for the Contrast operation.
static consteval float getContrastDefaultValue()
Gets the default value for the Contrast operation.
static consteval float getContrastMaxValue()
Gets the maximum allowed value for the Contrast operation.
CaptureMoment — footer