IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
peak_icv_gamma_feature.hpp
Go to the documentation of this file.
1
11#pragma once
12
16
17namespace peak
18{
19namespace pipeline
20{
21class DefaultPipeline;
22
23namespace features
24{
25
58class GammaFeature : public IFeature
59{
60public:
69
73 void SetEnabled(bool enabled) override;
74
78 PEAK_COMMON_NO_DISCARD bool IsEnabled() const override;
79
87 void ResetToDefault() override;
88
103 void SetValue(float gamma);
104
112 PEAK_COMMON_NO_DISCARD float GetValue() const;
113
123 PEAK_COMMON_NO_DISCARD peak::common::IntervalF GetRange() const;
124
125private:
127};
128
130 : m_module(module)
131{}
132
133inline void GammaFeature::SetEnabled(bool enabled)
134{
135 m_module.SetGammaEnabled(enabled);
136}
137
138inline bool GammaFeature::IsEnabled() const
139{
140 return m_module.IsGammaEnabled();
141}
142
144{
145 SetValue(1.0F);
146}
147
148inline void GammaFeature::SetValue(float gamma)
149{
150 m_module.SetGamma(gamma);
151}
152
153inline float GammaFeature::GetValue() const
154{
155 return m_module.GetGamma();
156}
157
159{
160 return m_module.GetGammaRange();
161}
162
163} // namespace features
164} // namespace pipeline
165} // namespace peak
Represents a continuous numeric interval with inclusive lower and upper bounds.
Tone curve correction is an image pipeline module that applies digital black correction and inverse g...
void SetGamma(float gamma)
Sets the gamma correction exponent.
float GetGamma() const
Gets the current gamma correction exponent.
peak::common::IntervalF GetGammaRange() const
Returns the valid range for the gamma correction exponent.
Gamma applies an inverse gamma transformation to an image.
GammaFeature(detail::ToneCurveCorrectionModule &module)
Creates a GammaFeature for an existing tone curve correction module.
peak::common::IntervalF GetRange() const
Retrieves the valid range for the gamma correction exponent.
void SetValue(float gamma)
Sets the gamma correction exponent.
void SetEnabled(bool enabled) override
Enables or disables the feature.
float GetValue() const
Gets the current gamma correction exponent.
void ResetToDefault() override
Resets the gamma value to the default.
bool IsEnabled() const override
Gets whether this feature is currently enabled.
Abstract base class for all image processing pipeline features.