| 210 | } |
| 211 | |
| 212 | void Lut3DOpData::Lut3DArray::getRGB(long i, long j, long k, float* RGB) const |
| 213 | { |
| 214 | const long length = getLength(); |
| 215 | const long maxChannels = getMaxColorComponents(); |
| 216 | const Array::Values& values = getValues(); |
| 217 | // Array order matches ctf order: channels vary most rapidly, then B, G, R. |
| 218 | long offset = (i*length*length + j*length + k) * maxChannels; |
| 219 | RGB[0] = values[offset]; |
| 220 | RGB[1] = values[++offset]; |
| 221 | RGB[2] = values[++offset]; |
| 222 | } |
| 223 | |
| 224 | void Lut3DOpData::Lut3DArray::setRGB(long i, long j, long k, float* RGB) |
| 225 | { |