Changeset 12188 for trunk/FACT++
- Timestamp:
- 10/17/11 19:47:14 (13 years ago)
- Location:
- trunk/FACT++/gui/RawEventsViewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
r12185 r12188 167 167 color = float(eventsData[eventNum][i][whichSlice]+(VALUES_SPAN/2))/(float)(VALUES_SPAN-1); 168 168 #else 169 color = float(eventData[nRoi* i+ whichSlice]+(VALUES_SPAN/2))/(float)(VALUES_SPAN-1);169 color = float(eventData[nRoi*hardwareMapping[i] + whichSlice]+(VALUES_SPAN/2))/(float)(VALUES_SPAN-1); 170 170 if (logScale) 171 171 { … … 271 271 float plusMe = VALUES_SPAN/2; 272 272 273 cout << "---> value span..." << endl;274 275 273 /* 276 274 if (drawCalibrationLoaded) … … 281 279 plusMe = 0 ;///=2; 282 280 }*/ 281 282 const int hw = hardwareMapping[selectedPixel]; 283 283 284 284 for (int i=0;i<nRoi-1;i++) … … 291 291 #else 292 292 293 float d1 = eventData[nRoi*selectedPixel + i]+plusMe; 294 float d2 = eventData[nRoi*selectedPixel + i+1]+plusMe; 293 294 float d1 = eventData[nRoi*hw + i]+plusMe; 295 float d2 = eventData[nRoi*hw + i+1]+plusMe; 295 296 if (!finite(d1)) d1 = 20000; 296 297 if (!finite(d2)) d2 = 20000; … … 1103 1104 for (int i=0;i<nRoi;i++) 1104 1105 { 1105 aMeas[i] = eventData[j* 1024+i];// * adcCount;1106 aMeas[i] = eventData[j*nRoi+i];// * adcCount; 1106 1107 1107 1108 } … … 1398 1399 timer.start(); 1399 1400 } 1400 /************************************************************ 1401 * CURRENT SLICE HAS CHANGE. ui handler 1402 ************************************************************/ 1403 void UIConnector::currentSliceHasChanged(int slice) 1401 1402 void UIConnector::displaySliceValue() 1404 1403 { 1405 1404 if (!GLWindow->nRoi) 1406 1405 return; 1407 // str << "Displaying Slice " << slice; 1408 // QString qstr(str.str().c_str()); 1406 1407 const int idx = 1408 GLWindow->nRoi*GLWindow->hardwareMapping[GLWindow->selectedPixel] 1409 + GLWindow->whichSlice; 1410 1411 ostringstream str; 1412 str << "Current Pixel val.: " << GLWindow->eventData[idx]; 1413 currentPixelValue->setText(QString(str.str().c_str())); 1414 } 1415 1416 /************************************************************ 1417 * CURRENT SLICE HAS CHANGE. ui handler 1418 ************************************************************/ 1419 void UIConnector::currentSliceHasChanged(int slice) 1420 { 1421 if (!GLWindow->nRoi) 1422 return; 1423 1409 1424 if (updateSpinnerDisplay) 1410 1425 displayingSliceBox->setValue(slice); 1411 1426 1412 ostringstream str; 1413 str << "Current Pixel val.: " << GLWindow->eventData[GLWindow->nRoi*GLWindow->selectedPixel + GLWindow->whichSlice]; 1414 currentPixelValue->setText(QString(str.str().c_str())); 1415 1416 } 1417 /************************************************************ 1427 displaySliceValue(); 1428 } 1429 1430 /***** 1431 ******************************************************* 1418 1432 * CURRENT EVENT HAS CHANGED. ui handler 1419 1433 ************************************************************/ 1434 1420 1435 double xval[50000]; 1421 1436 double yval[50000]; … … 1472 1487 triggerTypeLabel->setText(QString(str.str().c_str())); 1473 1488 1474 str.str(""); 1475 str << "Current Pixel val.: " << GLWindow->eventData[GLWindow->nRoi*GLWindow->selectedPixel + GLWindow->whichSlice]; 1476 currentPixelValue->setText(QString(str.str().c_str())); 1489 displaySliceValue(); 1477 1490 1478 1491 if (autoScaleColor->isChecked()) … … 1807 1820 triggerDelayHistoZoom->setZoomStack(stack); 1808 1821 stack.pop(); 1822 1809 1823 pixelChanged(GLWindow->selectedPixel); 1810 1824 } … … 1933 1947 1934 1948 } 1949 1935 1950 void UIConnector::pixelChanged(int pixel) 1936 1951 { 1937 1952 pixel = GLWindow->hardwareMapping[pixel]; 1953 1938 1954 HwIDBox->setValue(pixel); 1939 1955 … … 1970 1986 stack.pop(); 1971 1987 1972 ostringstream str; 1973 QString qstr; 1974 str << "Current Pixel val.: " << GLWindow->eventData[GLWindow->nRoi*GLWindow->selectedPixel + GLWindow->whichSlice]; 1975 currentPixelValue->setText(qstr.fromStdString(str.str())); 1988 displaySliceValue(); 1976 1989 on_autoScaleColor_clicked(); 1977 1990 } … … 1997 2010 updating = false; 1998 2011 1999 pixelChanged(GLWindow->softwareMapping[hwID]);2000 2001 2012 GLWindow->selectedPixel = GLWindow->softwareMapping[hwID]; 2002 2013 GLWindow->updateGL(); 2014 2015 pixelChanged(GLWindow->selectedPixel); 2003 2016 } 2004 2017 -
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.h
r12185 r12188 248 248 void on_blueValue4_valueChanged(double); 249 249 250 void pixelChanged(int pixel);250 void pixelChanged(int); 251 251 252 252 void cbpxChanged(); … … 269 269 void on_displayingSliceBox_valueChanged(int); 270 270 void on_displayingEventBox_valueChanged(int); 271 272 void displaySliceValue(); 271 273 272 274 int SetupConfiguration(Configuration &conf);
Note:
See TracChangeset
for help on using the changeset viewer.