Area, perimeter of objects within array of squares?

Hello, it’d be nice if you could give me a hand with the following problem:

I have a lot of brightfield images of arrays of square wells (micro-well arrays) that contain cells. Now I need to figure out the area, perimeter and ellipsoid of the area that the cells are taking up within the micro-well array. The problem is that the particle analyser can’t tell content of the micro-well and the micro-well edge apart, so I can only actually get the micro-wells from the analyser.

How do I get rid off the wells? I’ve tried trained Weka segmentation which seems to work somewhat, because it seems to understand better that the edges or the micro-wells are background. Unfortunately it takes a really long time, and while it’s alright-ish for the micro-well edges, I can’t get it to work well enough on the contents of the wells.

I’m just posting in the hopes I missed something very obvious, so any help would be appreciated. I can post an example if that helps

Thank you!

Theresa,

please post an image and indicate what you want to include (or exclude) to your analyses.
(Part of the well plate might be OK for this purpose.)

Best

Herbie

Hello Herbie,

thanks for your reply. This is an example of the type of micro-well I mean, which I have in a variety of configurations with varying numbers of wells (but the same organisation into columns and rows).

Cheers,
Theresa

Excellent Theresa,

from the example image I assume that the well borders are regularly arranged and perhaps it will be possible to avoid geometric image distortions and especially rotations. (The example image shows a slight rotation to the left.)

If the raster of the wells is known and reproducible, you could create selections (ROIs) that contain the inner parts of the wells. With ROI-manager you will then be able to analyse the inner parts of the wells separately.

Creating an appropriate array of square sized ROIs can be done by a little ImageJ-macro. Here is a list of the available macro-functions:
http://imagej.net/developer/macro/functions.html

Best

Herbie

1 Like

Hello Herbie,

thanks so much for this. I had tried this before, thinking I could get away without macros. When I set square ROIs inside of all wells and then use the particle analyser it only ever records the measurements I’ve set for one ROI, even if I select them all etc (very confusing --> see attached picture). But I guess that’s okay if I use a macro to got through the square ROIs one by one? So I’ll look into the macro business and that will hopefully do the trick.

Thanks, Theresa

Theresa,

here is your rotation-corrected example image:

And here is a sample macro that analyses the wells without “Analyze Particles”:

setBatchMode( true );
run( "Set Measurements...", "area fit shape area_fraction limit redirect=None decimal=3" );
sqr = 47;
col = 4;
row = 6;
xInc = 64.6;
yInc = 64.3;
xOff = 11;
yOff = 10;
x = xOff;
y = yOff;
setAutoThreshold( "Default dark" );
for ( j = 0; j < row; j++ ){
        for ( i = 0; i < col; i++ ){
            makeRectangle( x, y, sqr, sqr, 10 );
            x += xInc;
            run( "Measure" );
            //wait(200);
        }
        x = xOff;
        y += yInc;
}
resetThreshold();
run("Select None");
setBatchMode( false );
exit();

Hopefully it willl get you started.

Best

Herbie

4 Likes

I’ve tried it on a number of pictures, and changed it for different array setups as well and it works like a charm! Thanks so much! I’ll just have to get more comfortable with java now I guess :slight_smile: Thanks a bunch!

1 Like