MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / fillNoiseRGB

Method fillNoiseRGB

ij/src/main/java/ij/gui/NewImage.java:246–261  ·  view source on GitHub ↗
(ColorProcessor ip, boolean sp)

Source from the content-addressed store, hash-verified

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();

Callers 2

createStackMethod · 0.95
createRGBImageMethod · 0.95

Calls 6

showProgressMethod · 0.95
noiseMethod · 0.95
setChannelMethod · 0.80
addMethod · 0.65
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected