(ColorProcessor ip, boolean sp)
| 244 | } |
| 245 | |
| 246 | private static void fillNoiseRGB(ColorProcessor ip, boolean sp) { |
| 247 | int width = ip.getWidth(); |
| 248 | int height = ip.getHeight(); |
| 249 | ByteProcessor rr = new ByteProcessor(width, height); |
| 250 | ByteProcessor gg = new ByteProcessor(width, height); |
| 251 | ByteProcessor bb = new ByteProcessor(width, height); |
| 252 | if (sp) IJ.showProgress(0.0); |
| 253 | rr.add(127); if (sp) IJ.showProgress(0.05); |
| 254 | gg.add(127); if (sp) IJ.showProgress(0.10); |
| 255 | bb.add(127); if (sp) IJ.showProgress(0.15); |
| 256 | rr.noise(31); if (sp) IJ.showProgress(0.40); |
| 257 | gg.noise(31); if (sp) IJ.showProgress(0.65); |
| 258 | bb.noise(31); if (sp) IJ.showProgress(0.90); |
| 259 | if (sp) IJ.showProgress(1.0); |
| 260 | ip.setChannel(1,rr); ip.setChannel(2,gg); ip.setChannel(3,bb); |
| 261 | } |
| 262 | |
| 263 | private static void fillNoiseInt(ImageProcessor ip) { |
| 264 | Random rnd = new Random(); |
no test coverage detected