// This macro finds the location of the lower right most pixel // with the value max, where max is the highest pixel value // in the image. showStatus("Finging pixel with largest value..."); max = 0; peak=0; width = getWidth(); height = getHeight(); for (y=0; ymax) { max = value; xmax = x; ymax = y; } } } print("A pixel with the max value ("+max+") is located at "+xmax+","+ymax); curve=newArray(width); threshold = 0.9*max; for (y=0; ythreshold) { for (i=0;i<48;i++) { curve[i]=value; if((curve[i]curve[i+2])){ // max = value; // xmax = x; //ymax = y; peak=peak+1; } } } } } print(peak);