MCPcopy Create free account
hub / github.com/DentonW/DevIL / Vol

Function Vol

DevIL/src-IL/src/il_quantizer.cpp:180–190  ·  view source on GitHub ↗

Compute sum over a Box of any given statistic

Source from the content-addressed store, hash-verified

178
179// Compute sum over a Box of any given statistic
180ILint Vol(Box *cube, ILint mmt[33][33][33])
181{
182 return( mmt[cube->r1][cube->g1][cube->b1]
183 -mmt[cube->r1][cube->g1][cube->b0]
184 -mmt[cube->r1][cube->g0][cube->b1]
185 +mmt[cube->r1][cube->g0][cube->b0]
186 -mmt[cube->r0][cube->g1][cube->b1]
187 +mmt[cube->r0][cube->g1][cube->b0]
188 +mmt[cube->r0][cube->g0][cube->b1]
189 -mmt[cube->r0][cube->g0][cube->b0] );
190}
191
192/* The next two routines allow a slightly more efficient calculation
193 * of Vol() for a proposed subBox of a given Box. The sum of Top()

Callers 3

VarFunction · 0.85
CutFunction · 0.85
iQuantizeImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected