12 fBold.resize(1440,
false);
25 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
28 glTranslatef(0,-0.44,0);
29 glTranslatef(-0.1,0,0);
33 glTranslatef(-0.45,-0.45,0);
38 glTranslatef(0.45,-0.45,0);
40 glScalef(1.5, 1.5, 1.0);
41 glTranslatef(0,0,-0.5);
43 glTranslatef(0,0,0.1f);
47 glTranslatef(0,0,0.1f);
57 glTranslatef(0,0,0.1f);
62 glColor3f(1.f, 0.f, 0.f);
86 glTranslatef(0,0,0.1f);
104 qglColor(QColor(25, 22, 12));
112 str.setf(ios::fixed,ios::floatfield);
116 str <<
"Avg " <<
fmean;
119 str <<
"RMS " <<
frms;
122 str <<
"Min " <<
fmin;
123 renderText(3,
height()-3-3, QString(str.str().c_str()));
125 str <<
"Max " <<
fmax;
146 for (
int i=0;
i<11;
i++)
153 int h = (value - min)*pixelSpan;
157 float mult = (max - min)*pixelSpan;
158 fh = log10(h*10.f/mult);
163 int w = width() - (width()/50) - fontWidth*str.str().size();
164 if (
i==0 ||
i==10) w -= width()/50;
166 renderText(w, h, QString(str.str().c_str()));
167 value += (max - min)/10;
204 glTranslatef(0,0,0.1f);
219 glTranslatef(0,0,0.01);
220 glColor3f(1.f, 0.6f, 0.f);
233 fBold.assign(1440,
false);
238 if (cEvent->pos().x() > width()-(width()/50.f))
261 if (face != -1 &&
lastFace != face) {
274 if (
lastFace != face && isVisible())
324 return "QCameraWidget";
329 static stringstream stream;
334 stream <<
"Pixel=" << pixel <<
" Data=" <<
fData[pixel] <<
'\0';
337 return const_cast<char*
>(str.c_str());
341 double dmin =
fData[0];
342 double dmax =
fData[0];
345 if (finite(
fData[ii]))
347 dmin = dmax =
fData[ii];
355 if (!finite(
fData[
i]))
continue;
375 if (!finite(
fData[i]))
397 color = float((
fData[i]-dmin)/(dmax-dmin));
402 color = log10(color);
406 while (
ss[index] < color && index < 4)
409 if (index < 0) index = 0;
410 float weight0 = (color-
ss[index]) / (
ss[index+1]-
ss[index]);
411 if (weight0 > 1.0f) weight0 = 1.0f;
412 if (weight0 < 0.0f) weight0 = 0.0f;
413 float weight1 = 1.0f-weight0;
426 GLfloat averagePatchColour[3] = {0.0f,0.0f,0.0f};
427 for (
int i=0;
i<9;
i++)
428 for (
int j=0;j<3;j++)
430 for (
int j=0;j<3;j++)
431 averagePatchColour[j] /= 9;
432 for (
int j=0;j<3;j++)
460 cout <<
"Error: requested pixel highlight out of bounds" << endl;
481 if (idx < 0 || idx >=
NTMARK)
483 cout <<
"Error: requested patch highlight out of bounds" << endl;
void toggleInterfaceDisplay()
GLfloat highlightedPatchesCoulour[3]
GLfloat highlightedPixelsCoulour[3]
GLfloat pixelContourColour[3]
int64_t second
offset of this column in the tile, from the start of the heap area
void signalCurrentPixel(int pixel)
static GLfloat verticesList[NPIX *6][2]
GLfloat patchesCoulour[3]
int64_t first
Size of this column in the tile.
std::vector< double > fData
GLfloat tooLowValueCoulour[3]
void signalPixelMoveOver(int pixel)
GLfloat pixelsColor[NPIX][3]
virtual void UpdateText()
void signalPixelDoubleClick(int pixel)
#define ACTUAL_NUM_PIXELS
static int pixelsPatch[NPIX]
static std::vector< edge > patchesIndices[160]
void drawHexagon(int index, bool solid)
virtual int PixelAtPosition(const QPoint &pos)
GLfloat tooHighValueCoulour[3]
static int softwareMapping[NPIX]