| 25 | #include <QImage> |
| 26 | |
| 27 | class IntensityMap |
| 28 | { |
| 29 | public: |
| 30 | enum Mode { |
| 31 | AVERAGE, |
| 32 | MAX |
| 33 | }; |
| 34 | |
| 35 | IntensityMap(); |
| 36 | IntensityMap(int width, int height); |
| 37 | IntensityMap(const QImage &rgbImage, Mode mode, bool useRed = true, bool useGreen = true, bool useBlue = true, bool useAlpha = false); |
| 38 | double at(int x, int y) const; |
| 39 | double at(int pos) const; |
| 40 | void setValue(int x, int y, double value); |
| 41 | void setValue(int pos, double value); |
| 42 | size_t getWidth() const; |
| 43 | size_t getHeight() const; |
| 44 | void invert(); |
| 45 | QImage convertToQImage() const; |
| 46 | |
| 47 | private: |
| 48 | std::vector< std::vector<double> > map; |
| 49 | }; |
| 50 | |
| 51 | #endif // INTENSITYMAP_H |
no outgoing calls
no test coverage detected