All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HeatmapImageRenderer.h
1 #pragma once
2 
3 #include "HeatmapShapes.h"
4 #include "Types.h"
5 #include "Space.h"
6 #include "Geometry.h"
7 #include "Helpers.h"
8 #include "VectorMath.h"
9 
10 #include <vector>
11 
12 namespace Eegeo
13 {
14  namespace Shapes
15  {
16  namespace Heatmaps
17  {
18  namespace HeatmapImageRenderer
19  {
20  void WriteToLuminanceTexture(
21  const HeatmapImage& heatmapImage,
22  float rangeMin,
23  float rangeMax,
24  float scale,
25  float floatEncodeScale,
26  const Helpers::GLHelpers::TextureInfo& textureInfo
27  );
28 
29  void PlotPoints(
30  HeatmapImage& heatmapImage,
31  const std::vector<Eegeo::Space::WeightedLatLongAltitude>& data,
32  const double normativeValue,
33  const dv3& originEcef,
34  const m44& worldToTextureTransform
35  );
36 
37  std::vector<float> BuildGaussianKernel(float sigma);
38 
39  void GaussianBlur(
40  const HeatmapImage& input,
41  const std::vector<float>& gaussianKernel,
42  HeatmapImage& intermediate,
43  HeatmapImage& output
44  );
45 
46  void ApproximateGaussianBlur(
47  const HeatmapImage& input,
48  float sigma,
49  HeatmapImage& intermediate,
50  HeatmapImage& output
51  );
52 
53  std::vector<int> BuildBoxFilterRadiiForGaussianApproximation(
54  float sigma,
55  const int boxFilterCount
56  );
57 
58  void BoxBlurHorizontalTranspose(
59  const HeatmapImage& input,
60  HeatmapImage& output,
61  int radius
62  );
63 
64  void Transpose(
65  const HeatmapImage& input,
66  HeatmapImage& output
67  );
68 
69 
70  void DrawHeatmapTexture(
71  const HeatmapImage& pointsImage,
72  HeatmapImage& blurIntermediate,
73  HeatmapImage& blurOutput,
74  const float radiusPixels,
75  const float heatmapGain,
76  const float rangeMin,
77  const float rangeMax,
78  const bool useBoxFilterGaussianApproximation,
79  const float floatEncodeScale,
80  const Helpers::GLHelpers::TextureInfo& textureInfo
81  );
82 
83  void DrawTestBandsHeatmapTexture(
84  const float rangeMin,
85  const float rangeMax,
86  const float floatEncodeScale,
87  const Helpers::GLHelpers::TextureInfo& textureInfo
88  );
89 
90  void DrawTestBands(const double rangeMin, const double rangeMax, HeatmapImage& image);
91 
92  };
93  }
94  }
95 }