Posted by
leo durosemont on
URL: http://imagej.273.s1.nabble.com/new-Bio-Formats-tp3701686p3701696.html
Nas,
The previous answer will work from a plugin. You can also do this easily with a simple macro. In the example below, a mask is created from the active selection, and dumped into an array (m). Then the mask is closed, and the positions and values of pixels that are not empty in the mask array are printed.
Leo.
// list pixels values inside a selection
run("Blobs (25K)");
w=getWidth();h=getHeight();
makePolygon(110,24,73,41,95,52,116,38);
getSelectionBounds(xmin, ymin, selwidth, selheight);
run("Create Mask");
m=newArray(w*h);
for(x=0;x<w;x++){
for(y=0;y<h;y++){
m[y*w+x]=getPixel(x,y);
}
}
close(); //close mask
for(x=xmin;(x<=xmin+selwidth);x++){
for(y=ymin;(y<=ymin+selheight);y++){
if (m[y*w+x]!=0) print (x,y,getPixel(x,y));
}
}
Nas <
[hidden email]> wrote: Dear all,
I would like to get a list of the values for each
pixel inside a ROI. how could I do that. I just know
about the list that you can get through
Analyze-->distribustion bye setting bins which is not
what I'm looking for.
Thanks for your help,
Nas
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.