IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
peak_icv_mirror_feature.hpp
Go to the documentation of this file.
1
11#pragma once
12
16
17namespace peak
18{
19namespace pipeline
20{
21namespace features
22{
23
38class MirrorFeature : public IFeature
39{
40public:
49
53 void SetEnabled(bool enabled) override;
54
58 PEAK_COMMON_NO_DISCARD bool IsEnabled() const override;
59
67 void ResetToDefault() override;
68
76 void SetLeftRightEnabled(bool enabled);
77
85 void SetUpDownEnabled(bool enabled);
86
94 PEAK_COMMON_NO_DISCARD bool IsLeftRightEnabled() const;
95
103 PEAK_COMMON_NO_DISCARD bool IsUpDownEnabled() const;
104
105private:
107};
108
110 : m_module(module)
111{}
112
113inline void MirrorFeature::SetEnabled(bool enabled)
114{
115 m_module.SetMirrorEnabled(enabled);
116}
117
118inline bool MirrorFeature::IsEnabled() const
119{
120 return m_module.IsMirrorEnabled();
121}
122
124{
125 m_module.SetMirrorLeftRightEnabled(false);
126 m_module.SetMirrorUpDownEnabled(false);
127}
128
129inline void MirrorFeature::SetLeftRightEnabled(bool enabled)
130{
131 m_module.SetMirrorLeftRightEnabled(enabled);
132}
133
134inline void MirrorFeature::SetUpDownEnabled(bool enabled)
135{
136 m_module.SetMirrorUpDownEnabled(enabled);
137}
138
140{
141 return m_module.IsMirrorLeftRightEnabled();
142}
143
145{
146 return m_module.IsMirrorUpDownEnabled();
147}
148
149} // namespace features
150} // namespace pipeline
151} // namespace peak
Transformation is an image pipeline module that provides mirror and rotation functionality.
void SetMirrorLeftRightEnabled(bool enabled)
Sets whether the image should be mirrored left-right.
bool IsMirrorLeftRightEnabled() const
Gets the current left-right mirroring setting.
bool IsMirrorUpDownEnabled() const
Gets the current up-down mirroring setting.
void SetMirrorUpDownEnabled(bool enabled)
Sets whether the image should be mirrored up-down.
Abstract base class for all image processing pipeline features.
Mirror provides functionality to flip the image left-right or up-down.
void SetLeftRightEnabled(bool enabled)
Sets whether the image should be mirrored left-right.
bool IsUpDownEnabled() const
Gets the current up-down mirroring setting.
MirrorFeature(detail::TransformationModule &module)
Creates a MirrorFeature for an existing transformation module.
bool IsLeftRightEnabled() const
Gets the current left-right mirroring setting.
void SetEnabled(bool enabled) override
Enables or disables the feature.
void SetUpDownEnabled(bool enabled)
Sets whether the image should be mirrored up-down.
void ResetToDefault() override
Resets the mirroring to the default value.
bool IsEnabled() const override
Indicates whether the feature is currently enabled.