Changeset 11861 for trunk/FACT++/gui/QCameraWidget.cc
- Timestamp:
- 08/09/11 16:09:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/QCameraWidget.cc
r11799 r11861 133 133 double dmin = fData[0]; 134 134 double dmax = fData[0]; 135 if (fMin < 0 && fMax < 0) 135 136 for (int i=0;i<1440;i++) 136 137 { … … 144 145 for (int i=0;i<ACTUAL_NUM_PIXELS;i++) 145 146 { 147 if (fData[i] < dmin) 148 { 149 pixelsColor[i][0] = pixelsColor[i][1] = pixelsColor[i][2] = 0; 150 continue; 151 } 152 if (fData[i] > dmax) 153 { 154 pixelsColor[i][0] = pixelsColor[i][1] = pixelsColor[i][2] = 1; 155 continue; 156 } 146 157 color = float((fData[i]-dmin)/(dmax-dmin)); 147 158 if (!fEnable[i]) 148 159 color = 0; 149 160 int index = 0; 150 while (ss[index] < color )161 while (ss[index] < color && index < 4) 151 162 index++; 152 163 index--; 153 164 if (index < 0) index = 0; 154 if (index > 3) index = 3;165 // if (index > 3) index = 3; 155 166 float weight0 = (color-ss[index]) / (ss[index+1]-ss[index]); 156 167 if (weight0 > 1.0f) weight0 = 1.0f;
Note:
See TracChangeset
for help on using the changeset viewer.