Posted by
Michael Schmid on
Oct 14, 2013; 1:37pm
URL: http://imagej.273.s1.nabble.com/Summarize-all-pixelvalues-inside-round-ROI-tp5005136p5005164.html
Hi GuPInt,
probably the easiest option would be to deselect all at the beginning, then use setKeyDown("shift") before each 'doWand'. This makes the Wand add to the selection. When done with all points, use getStatistics or getRawStatistics to get the desired information on the complete area.
Alternatively, you could add all ROIs created by 'doWand' to the ROI Manager; then you could use ROI Manager 'OR (Combine)'.
Both ways, overlapping regions (if any) will be counted only once.
---
Concerning 'doWand', I would suggest to use 'doWand(x, y, tolerance, mode)', with mode = "4-connected" or "8-connected". This is more reliable than the classic 'doWand' command, which usually uses 8-connected mode, but sometimes switches to 4-connected, depending on the image data.
Michael
________________________________________________________________
On Oct 11, 2013, at 16:09, GuPInt wrote:
> Hi list,
>
> I want to do some automated measurements with a macro measureing regions
> wich I selected via doWand(x,y);
> Now I want to summarize all pixel grayvalues inside this selected ROI and
> save the sum in a variable.
> I'm new to ImageJ and didn't find a way yet. So at the moment I have my x,y
> coordinates for my doWand command and the selected ROI. Does someone have an
> idea how to summarize all the values in my macro?
>
> my algorithm looks like this:
>
> run("Find Maxima...", "noise=10 output=List exclude");
>
> for(i=0; i<nResults; i++) {
> x=getResult("X", i);
> y=getResult("Y", i);
> doWand(x,y);
>
>
> thanks in advance and kind regards
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html