//@AutoInstall // This tool displays, in the Results table, the // coordinates and pixel value at the location // you click on on. With color images, displays // red, green and blue values. // // You can permanently install this tool in the ImageJ // toolbar by saving it in the ImageJ/plugins/Tools // folder as "Point Picker Tool.ijm", restarting // ImageJ and selecting "Point Picker Tool" from // the toolbar's ">>" menu. macro "Point Picker Tool -C037F07f2F702f" { getCursorLoc(x, y, z, flags); intensity = getValue(x,y); row = nResults; setResult("X", row, x); setResult("Y", row, y); if (nSlices>1) setResult("Z", row, z); setResult("Value", row, intensity); if (bitDepth==24) { v = getPixel(x,y); red = (v>>16)&0xff; // extract red byte (bits 23-17) green = (v>>8)&0xff; // extract green byte (bits 15-8) blue = v&0xff; // extract blue byte (bits 7-0) setResult("R", row, red); setResult("G", row, green); setResult("B", row, blue); } updateResults; }