//N.Vischer, 12.12.17 15:27 macro "New Random 8-Bit [1]"{ testRandom("8-bit", "random"); } macro "New Random 16-Bit [2]"{ testRandom("16-bit", "random"); } macro "New Random 32-Bit [3]"{ testRandom("32-bit", "random"); } macro "New Random RGB [4]"{ testRandom("RGB", "random"); } macro "Process Noise 8-Bit [5]"{ testRandom("8-bit", "white"); } macro "Process Noise 16-Bit [6]"{ testRandom("16-bit", "white"); } macro "Process Noise 32-Bit [7]"{ testRandom("32-bit", "white"); } macro "Process Noise RGB [8]"{ testRandom("RGB", "white"); } function testRandom(type, filling){ close("*"); mySeed = 4; pairs = split("A B C"); for(n=0; n <=2; n++){ random("seed", mySeed); newImage(pairs[n] + "-1", type + " " + filling, 5, 5, 3); if(filling == "white"){ run("Add Noise", "stack"); run("Add Specified Noise...", "stack standard=25"); if(type == "8-bit") run("Salt and Pepper", "stack"); } run("Set... ", "zoom=2500"); run("Enhance Contrast", "saturated=0.35"); setLocation(200, 80 + n * 200); newImage(pairs[n] + "-2", type + "random", 5, 5, 3); run("Set... ", "zoom=2500"); run("Enhance Contrast", "saturated=0.35"); setLocation(480, 80 + n * 200); } }