Set a single value at the specified coordinates.
- Parameters
-
| coordinates | N-dimensional coordinates |
| value | Value to set |
Implements MayaFlux::Kakshya::NDDataContainer.
Definition at line 246 of file VideoStreamContainer.cpp.
247{
248 if (coordinates.size() < 4 ||
m_data.empty())
249 return;
250
251 auto* pixels = std::get_if<std::vector<uint8_t>>(&
m_data[0]);
252 if (!pixels)
253 return;
254
255 const uint64_t frame = coordinates[0];
256 const uint64_t y = coordinates[1];
257 const uint64_t x = coordinates[2];
258 const uint64_t c = coordinates[3];
259
261 return;
262
266 + c;
267
268 if (idx >= pixels->size())
269 return;
270
271 (*pixels)[idx] = static_cast<uint8_t>(std::clamp(value * 255.0, 0.0, 255.0));
272}
std::vector< DataVariant > m_data
References m_channels, m_data, m_height, m_num_frames, and m_width.