IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
peak_icv_saturation_feature.hpp
Go to the documentation of this file.
1
11#pragma once
12
16
17namespace peak
18{
19namespace pipeline
20{
21namespace features
22{
41{
42public:
51
55 void SetEnabled(bool enabled) override;
56
60 PEAK_COMMON_NO_DISCARD bool IsEnabled() const override;
61
69 void ResetToDefault() override;
70
87 void SetValue(float saturation);
88
96 PEAK_COMMON_NO_DISCARD float GetValue() const;
97
107 PEAK_COMMON_NO_DISCARD peak::common::IntervalF GetRange() const;
108
109private:
111};
112
116
117inline void SaturationFeature::SetEnabled(bool enabled)
118{
119 m_module.SetSaturationEnabled(enabled);
120}
121
123{
124 return m_module.IsSaturationEnabled();
125}
126
128{
129 SetValue(1.0F);
130}
131
132inline void SaturationFeature::SetValue(float saturation)
133{
134 m_module.SetSaturation(saturation);
135}
136
137inline float SaturationFeature::GetValue() const
138{
139 return m_module.GetSaturation();
140}
141
143{
144 return m_module.GetSaturationRange();
145}
146
147} // namespace features
148} // namespace pipeline
149} // namespace peak
Represents a continuous numeric interval with inclusive lower and upper bounds.
Color matrix transformation is an image pipeline module that applies a ColorCorrectionMatrix to an im...
bool IsSaturationEnabled() const
Checks if the saturation adjustment feature is enabled.
peak::common::IntervalF GetSaturationRange() const
Gets the valid range for saturation.
void SetSaturationEnabled(bool enabled)
Enables or disables the saturation adjustment feature.
Abstract base class for all image processing pipeline features.
Adjusts the saturation of an image by modifying a 3x3 ColorCorrectionMatrix.
peak::common::IntervalF GetRange() const
Gets the valid range for the saturation value.
void SetValue(float saturation)
Sets the saturation value.
void SetEnabled(bool enabled) override
Enables or disables the feature.
float GetValue() const
Gets the current saturation value.
void ResetToDefault() override
Resets the saturation value to its default.
SaturationFeature(detail::ColorMatrixTransformationModule &module)
Creates a SaturationFeature using an existing color matrix transformation module.
bool IsEnabled() const override
Gets whether this feature is currently enabled.