1 #ifndef BASIC_GL_CAMERA_H_ 2 #define BASIC_GL_CAMERA_H_ 4 #define NBOARDS 40 // max. number of boards 5 #define NPIX 1440 // max. number of pixels 6 #define NTMARK 160 // max. number of timeMarker signals 8 #define MAX_NUM_PIXELS 1600 9 #define ACTUAL_NUM_PIXELS 1440 13 #include <QtOpenGL/QGLWidget> 56 void setAutoscaleLowerLimit(
float);
61 static int pixelsPatch[
NPIX];
65 GLfloat patchColour[3];
66 GLfloat pixelContourColour[3];
67 GLfloat patchesCoulour[3];
68 GLfloat highlightedPatchesCoulour[3];
69 GLfloat highlightedPixelsCoulour[3];
70 GLfloat tooHighValueCoulour[3];
71 GLfloat tooLowValueCoulour[3];
77 void setUnits(
const std::string& units);
78 void setTitle(
const std::string& title);
79 void SetWhite(
int idx);
80 void SetMin(int64_t min);
81 void SetMax(int64_t max);
82 void SetAutoRefresh(
bool on);
84 void assignPixelMap(
const PixelMap& );
85 void enableText(
bool);
95 void linearScalePlease(
bool);
96 void logScalePlease(
bool);
97 void regularPalettePlease(
bool);
98 void prettyPalettePlease(
bool);
99 void greyScalePalettePlease(
bool);
100 void glowingPalettePlease(
bool);
101 void zeroRotationPlease(
bool);
102 void plus90RotationPlease(
bool);
103 void minus90RotationPlease(
bool);
107 void signalCurrentPixel(
int pixel);
108 void signalPixelMoveOver(
int pixel);
109 void signalPixelDoubleClick(
int pixel);
110 void colorPaletteHasChanged();
111 void signalUpdateCamera();
116 virtual void initializeGL();
117 virtual void resizeGL(
int width,
int height);
118 virtual void paintGL();
119 virtual void mousePressEvent(QMouseEvent *event);
120 virtual void mouseMoveEvent(QMouseEvent *event);
121 virtual void mouseDoubleClickEvent(QMouseEvent *event);
122 virtual void drawCamera(
bool alsoWire);
123 virtual void drawPatches();
124 virtual void setPatchColor(
int id,
float color[3]);
125 virtual int PixelAtPosition(
const QPoint &pos);
126 virtual void DrawCameraText();
127 void drawHexagon(
int index,
bool solid);
136 static int hardwareMapping[
NPIX];
138 static GLfloat verticesList[
NPIX*6][2];
139 static std::vector<edge> patchesIndices[160];
140 static int verticesIndices[
NPIX][6];
141 static int softwareMapping[
NPIX];
145 virtual void UpdateText();
147 void toggleInterfaceDisplay();
167 void buildVerticesList();
168 virtual void buildPatchesIndices();
169 void updateNeighbors(
int currentPixel);
170 void calculatePixelsCoords();
175 void skipPixels(
int start,
int howMany);
180 float fmin, fmax, fmean,
frms, fmedian;
QRadioButton * minus90RotationButton
QButtonGroup * colorGroup
QRadioButton * linearButton
structure for storing edges of hexagons (for blurry display)
QRadioButton * glowingPaletteButton
structure for storing neighbors of pixels. For camera position calculation and blurry display ...
int & operator[](int index)
QRadioButton * zeroRotationButton
std::vector< double > fData
QButtonGroup * scaleGroup
QLabel * colorPaletteLabel
QRadioButton * regularPaletteButton
QButtonGroup * rotationGroup
static PixelMap fPixelMap
QRadioButton * prettyPaletteButton
QRadioButton * greyScalePaletteButton
QRadioButton * plus90Rotationbutton