IDS peak ICV v1.2.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
60class GammaFeature : public IFeature
61{
62public:
71
75 void SetEnabled(bool enabled) override;
76
80 PEAK_COMMON_NO_DISCARD bool IsEnabled() const override;
81
89 void ResetToDefault() override;
90
105 void SetValue(float gamma);
106
114 PEAK_COMMON_NO_DISCARD float GetValue() const;
115
125 PEAK_COMMON_NO_DISCARD peak::common::IntervalF GetRange() const;
126
127private:
129};
130
132 : m_module(module)
133{}
134
135inline void GammaFeature::SetEnabled(bool enabled)
136{
137 m_module.SetGammaEnabled(enabled);
138}
139
140inline bool GammaFeature::IsEnabled() const
141{
142 return m_module.IsGammaEnabled();
143}
144
146{
147 SetValue(1.0F);
148}
149
150inline void GammaFeature::SetValue(float gamma)
151{
152 m_module.SetGamma(gamma);
153}
154
155inline float GammaFeature::GetValue() const
156{
157 return m_module.GetGamma();
158}
159
161{
162 return m_module.GetGammaRange();
163}
164
165} // namespace features
166} // namespace pipeline
167} // 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
Indicates whether the feature is currently enabled.
Abstract base class for all image processing pipeline features.