Scales a threshold level to the range 0-255.
(ImageProcessor ip, double threshold)
| 210 | |
| 211 | /** Scales a threshold level to the range 0-255. */ |
| 212 | int scaleDown(ImageProcessor ip, double threshold) { |
| 213 | double min = ip.getMin(); |
| 214 | double max = ip.getMax(); |
| 215 | if (max>min) |
| 216 | return (int)(((threshold-min)/(max-min))*255.0); |
| 217 | else |
| 218 | return 0; |
| 219 | } |
| 220 | |
| 221 | void drawPlot(long maxCount, ImageProcessor ip) { |
| 222 | if (frame == null) |