Measuring over regular increments using macro

Hi i am working with standard 100cmx10cm (around 11370x1170 pixels) 16-bit greyscale images. I am looking for a way to sample with a straight line across the width of an image: the mean, standard deviation, max and min values of the greyscale values at regular increments down the image (lengthwise) (e.g. 1cm). This can be simply operated manually by drawing the line and hitting ctrl+m at each stage. But is there a quick way of running this manually as a macro?

the output would give 100 measurements of the greyscale values across the width of the image. This would be repeated down the length of the image at regular intervals (for example 1cm).

Something like this?

newImage("Untitled", "8-bit ramp", 256, 256, 1);
run("Set Measurements...", "mean standard min display redirect=None decimal=2");
roiManager("Show All without labels");
1 Like


Thanks thats great, i’ve been able to get what i want from tweaking around with that, excellent