MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / validate

Method validate

src/OpenColorIO/ops/log/LogOpData.cpp:202–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void LogOpData::validate() const
203{
204 ValidateParams(m_redParams, m_direction);
205 ValidateParams(m_greenParams, m_direction);
206 ValidateParams(m_blueParams, m_direction);
207
208 if (m_redParams.size() != m_greenParams.size() ||
209 m_redParams.size() != m_blueParams.size())
210 {
211 throw Exception("Log: Red, green & blue parameters must have the same size.");
212 }
213
214 if (m_base == 1.0)
215 {
216 std::ostringstream oss;
217 oss << "Log: Invalid base value '";
218 oss << m_base;
219 oss << "', base cannot be 1.";
220 throw Exception(oss.str().c_str());
221 }
222 else if (m_base <= 0.0)
223 {
224 std::ostringstream oss;
225 oss << "Log: Invalid base value '";
226 oss << m_base;
227 oss << "', base must be greater than 0.";
228 throw Exception(oss.str().c_str());
229 }
230}
231
232bool LogOpData::isIdentity() const
233{

Callers 2

inverseMethod · 0.45
BuildLogOpFunction · 0.45

Calls 2

ValidateParamsFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected