Login  Register

Re: Analyzing a grid of ROIs

Posted by BenTupper on May 09, 2013; 4:20pm
URL: http://imagej.273.s1.nabble.com/Analyzing-a-grid-of-ROIs-tp5002945p5002963.html

Hi,

On May 7, 2013, at 2:18 PM, Audrey O'Neill wrote:

> Hello -
>
> Does anyone have experience with anaylzing a grid of square ROIs according to mean gray values?
>
> Basically, I am trying to quantify how sorted or patchy a given field of cells (half of which are stained for GFP) is, using nearest-neighbor analysis.
>
> The method is described in more detail in this paper (http://www.ncbi.nlm.nih.gov/pubmed/9520108?dopt=Abstract), but basically what we want to do is:
>
> 1. divide the image into a grid of squares with height and width approximately equal to cell diameter
> 2. find the mean gray value of the whole image and set it as the threshold
> 3. count each square as above or below the threshold
> 4. count how many of each "above threshold" square's nearest neighbor squares (above, below, left, and right) are above threshold
>
> I can do step (1) using a variant of the macro found here (http://imagej.1557.x6.nabble.com/How-to-create-a-regular-grid-of-rectangular-ROI-s-td3685056.html), and step (2) is fairly trivial, but I am totally lost when it comes to steps (3) and (4).
>

You might be able to adapt the RATSQuadtree class in the RATS_ plugin - see http://rsb.info.nih.gov/ij/plugins/rats/index.html  Once the quadtree is set up, you can query any 'leaf' to compute stats about the companion image within each 'leaf'.  My memory of it is fuzzy enough that I don't recall if it will require a lot of tweaking to enforce square leaves - I think it is set up now to subdivide based upon a suggested minimum leaf size so you may end up with rectangles rather than squares.

Cheers,
Ben





> Thanks very much!
>
> Audrey
> Postdoc, Bush lab
> Cell and Tissue Biology
> UCSF School of Dentistry
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html