lens profile: report availability of distortion and vignetting

Beside CA, report also distortion and vignetting availability. Rename
is${CORRECTION}Available methods to has${CORRECTION}.
This commit is contained in:
Simone Gotti
2024-06-13 20:03:07 +02:00
parent dc0e23c82c
commit b98fa42857
5 changed files with 43 additions and 12 deletions

View File

@@ -102,6 +102,21 @@ LFModifier::operator bool() const
}
bool LFModifier::hasDistortionCorrection() const
{
return (flags_ & LF_MODIFY_DISTORTION);
}
bool LFModifier::hasCACorrection() const
{
return (flags_ & LF_MODIFY_TCA);
}
bool LFModifier::hasVignettingCorrection() const
{
return (flags_ & LF_MODIFY_VIGNETTING);
}
void LFModifier::correctDistortion(double &x, double &y, int cx, int cy) const
{
if (!data_) {
@@ -125,11 +140,6 @@ void LFModifier::correctDistortion(double &x, double &y, int cx, int cy) const
}
}
bool LFModifier::isCACorrectionAvailable() const
{
return (flags_ & LF_MODIFY_TCA);
}
void LFModifier::correctCA(double &x, double &y, int cx, int cy, int channel) const
{
assert(channel >= 0 && channel <= 2);