Blender V4.3
QInformationMap.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12#include <qimage.h>
13
14#include "InformationMap.h"
15
16namespace Freestyle {
17
18class QInformationMap : public InformationMap {
19 private:
20 QImage _map; // the image or a piece of image
21
22 public:
24 QInformationMap(const QImage &);
27
28 // float getSmoothedPixel(int x, int y, float sigma = 0.2f);1
29 virtual float getMean(int x, int y);
30 virtual void retrieveMeanAndVariance(int x, int y, float &oMean, float &oVariance);
31
32 inline const QImage &map() const
33 {
34 return _map;
35 }
36
37 inline void setMap(const QImage &iMap, float iw, float ih)
38 {
39 _map = iMap.copy();
40 _w = iw;
41 _h = ih;
42 }
43
44 protected:
45 virtual float computeGaussian(int x, int y);
46};
47
48} /* namespace Freestyle */
void setMap(const QImage &iMap, float iw, float ih)
QInformationMap & operator=(const QInformationMap &)
QInformationMap(const QImage &)
virtual float getMean(int x, int y)
QInformationMap(const QInformationMap &)
virtual void retrieveMeanAndVariance(int x, int y, float &oMean, float &oVariance)
const QImage & map() const
virtual float computeGaussian(int x, int y)
inherits from class Rep
Definition AppCanvas.cpp:20