Posted by
gankaku on
Feb 16, 2018; 1:53pm
URL: http://imagej.273.s1.nabble.com/Extracts-individual-pixel-values-from-a-selection-or-RIO-tp5020121p5020122.html
Hi Mirko,
the following macro should do what you need:
//------------------------------------------------
Roi.getBounds(rx, ry, width, height);
row = 0;
for(y=ry; y<ry+height; y++) {
for(x=rx; x<rx+width; x++) {
if(Roi.contains(x, y)==1) {
setResult("X", row, x);
setResult("Y", row, y);
setResult("Value", row, getPixel(x, y));
row++;
}
}
}
//------------------------------------------------
Hope this helps,
Jan
2018-02-16 13:03 GMT+01:00 zherxes <
[hidden email]>:
> Dear all,
>
> I am struggling to extract individual pixel values from a selection or area
> of interest. I have tried to save the image as a text file, but it is very
> hard working to find and collect the pixels I am interested in. I have also
> tried to extract the histogram values from the option "list" however, it
> put
> several pixels with in a bin range and I want to extract every single
> individual value.
>
> Do you know any way to do this?
>
> Many thanks in advance
> :)
>
>
>
> --
> Sent from:
http://imagej.1557.x6.nabble.com/>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
CEO: Dr. Jan Brocher
phone: +49 (0)176 705 746 81
e-mail:
[hidden email]
info:
[hidden email]
inquiries:
[hidden email]
web: www.biovoxxel.de
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html