diff options
Diffstat (limited to 'src/pixels.h')
| -rw-r--r-- | src/pixels.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/pixels.h b/src/pixels.h new file mode 100644 index 0000000..6095220 --- /dev/null +++ b/src/pixels.h @@ -0,0 +1,32 @@ +#pragma once + +#include <array> + +#include "fuck_intel.h" + +#include <QString> + +#include "typedefs.h" + +struct Pixels +{ + Counters counters{}; + std::array<float, img_width> pixels{0.f}; + + Pixels& operator+=(const Pixels& other); + Pixels& operator/=(const float divider); + + // TODO: tests for everything everywhere + /*! + * \brief load - load binary pixels from file + * \param filename - file path + * \return Pixels on success, empty std::optional otherwise + */ + [[nodiscard]] static std::optional<Pixels> load(const QString& filename); + /*! + * \brief save - save binary profile to file + * \param filename - file path + * \return - true on success, false otherwise + */ + [[nodiscard]] bool save(const QString& filename); +}; |
