function CIJA(input, output, filename,scale) //converts image to 8 bit, sets the image scale based on the magnification specified by user, //auto thresholds, inverts image, and analyzes particles. All calculations are based on IEST-STD-CC1246E { open(input + filename); run("8-bit"); sensor_x=23500*scale; //uses the known sensor size of the camera to calculate the image size with the magnification used. sensor_y=15600*scale; total_area = sensor_x*sensor_y; run("adaptiveThr ", "using=Mean"); run("Invert"); run("Analyze Particles...", "clear"); count = nResults(); //num particles is num of results resultsArray=newArray(); for(i=0;i