Hi Ke Le,
try this macro code (for 8-bit image only):
// ******************************
getSelectionBounds(x0,y0,w,h);
a = newArray(w);
for (x=0; x<w; x++){
max = 0;
for (y=0; y<h; y++){
val = getPixel(x0+x, y0+y);
if (val > max)
max = val;
}
a[x] = max;
}
newImage("MaxImage", "8-bit", w, 1, 1);
for (x=0; x<w; x++)
setPixel(x, 0, a[x]);
run("Select All");
run("Plot Profile")
// ******************************
Regards,
Peter
On 18.02.2016 16:25, Ke Li wrote:
> Hi everyone,
>
> I am new to ImageJ and have a question about Plot Profile. I have a .tif
> file and would like to have plot profile of a rectangular selection. Does
> anyone know how to get the maximum pixel intensity of each column as
> y-axis, instead of the default "vertically averaged pixel intensity". Any
> suggestion is greatly appreciated.
>
> Thank you,
> Ke Li
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html