Threshold based ROI generation and quantification of a time series

Hello all,
First post here. I scrolled and searched through the previous posts, but I did not come across a similar topic.

Description of the problem:
I have fungal spores expressing a fluorescent sensor that are germinating on a leaf surface. These are 4 channel, confocal z-stack images, taken at set intervals. The spores are made up of multiple cells, that are separated by cell walls. I am interested in segmenting the cells of the spores and then quantifying the intensity of the fluorescent reporter over the time series.


The 4 channels are blue, green, DIC and a ratio of the blue green channels output through Zen.

What I am struggling with is generating the ROIs for each of the cells.

Here is what I have done thus far:

  1. split channels --> for quantification I only care about 1 channel, however for figure generation I will need multiple channels overlaid.
  2. 0.5 Gaussian filter of the ratio channel to smooth the data
  3. Duplicate filtered image so I can generate a mask to then make ROIs
  4. convert one of the duplicated channels to binary
  5. watershed the images to split up any connected spores - this worked amazingly well.

That is where I get stuck.

How do I take the binary image and make masks to quantify the ratio image?
Ratio image
SPORE_Rainbow_LUT
Binary image
Spore_ROIs

Please let me know if you need any additional information.

Looking forward to your replies!

-Tim

Hi @Tim_Chaya

You already have a binary mask, so you just need to use it to measure what you want:

  1. Go to Analyze>Set Measurements... to select what you want to measure.
  2. Also at Set Measurements... window, make sure that you select the image that you want to measure (the ratio image) within the Redirect to: drop-down menu.
  3. Select your binary mask image.
  4. Analyze>Analyze Particles. Check Display results to obtain a result table. This way, your binary mask will be measured on your ratio image.

If you prefer to use ROIs, having the binary image you can generate the corresponding ROIs in Analyze>Analyze Particles checking Add to Manager. Then you could measure different images by selecting them and clicking the Measure button of the ROI Manager.

Hope it helps
Best

Pau

Hello @pau.
Thanks four your reply.
Sorry I forgot to mention. I would like to track the measurements for each cell individually. I am interested in seeing if there are any peaks in the ratio channel in each cell while the spore is germinating.

I tried both of ways of analyzing particles above and it gives me a mean for all of the cells per time point.

Hi Tim

Analyze Particles measures each object individually. I’m not sure why you are getting just one. When you check Add to Manager are you getting 1 or 10 ROIs? If you don’t mind, would share your binary and ratio image files, so I can try

You do not need any ROIs. Run the Particle Analyzer (or the Particles8 plugin) on the binary image and use the Redirect option to point to the desired fluorescence channel to be assessed.
If you use the Particles8 plugin, you could join three channels as an RGB image and redirect the analysis to that image. The result table will hold a number of intensity descriptors for the R, G and B channels in different columns (which correspond to the original fluorescence channels).

@pau
Let’s see if this works. If not, I can dropbox them to you.
MAX_C4-chet 3.2 b73 1HPI 10min interval 07082019_4channel_crop-3_ratio-2.tif (1.5 MB)
MAX_C4-chet 3.2 b73 1HPI 10min interval 07082019_4channel_crop-2_outline.tif (1.5 MB)

@gabriel
That plug-in does not appear to be in my version of Fiji, even though it is up to date. Do you have a link for it?

Thanks.

Particles8 gets installed if you select the Morphology update site.

Hi Tim,
You can run this macro on the binary image in order to index your masks sorted from left to right. Then you could threshold each index with setThreshold(index, index) to measure only one object over the stack. However, you will need to improve the segmentation, since some objects are split, changing the index order, and you have small particles segmented as well.

Stack.getDimensions(width, height, channels, slices, frames);
makeRectangle(1, 1, width-2, height-2);
run("Crop");
run("Make Binary", "method=Default background=Default calculate black");
for (i=1; i<=frames; i++) {
	setSlice(i);
	run("Analyze Particles...", "display clear record slice");
	n=nResults;
	Table.sort("XStart");
	for(j=0; j<n; j++) {
		x=getResult("XStart", j);
		y=getResult("YStart", j);
		setColor(j+1);
		floodFill(x, y, "8");
	}
}

run("Clear Results");
setSlice(1);
run("glasbey_inverted");

Maybe something like this (to run on the ratio image)

run("Duplicate...", "title=local_threshold duplicate");
run("Gaussian Blur...", "sigma=1 stack");
run("Auto Local Threshold", "method=Mean radius=20 parameter_1=0 parameter_2=0 white stack");
run("Watershed", "stack");
run("Analyze Particles...", "size=50-Infinity pixel show=Masks stack");
rename("indexes");
Stack.getDimensions(width, height, channels, slices, frames);
run("Make Binary", "method=Default background=Default calculate black");

for (i=1; i<=slices; i++) {
	setSlice(i);
	run("Analyze Particles...", "display clear record slice");
	n=nResults;
	Table.sort("XStart");
	for(j=0; j<n; j++) {
		x=getResult("XStart", j);
		y=getResult("YStart", j);
		if (j<9) {
			setColor(j+1);
		} else {
			setColor(10);
		}	
		floodFill(x, y, "8");
	}
}

selectWindow("Results");
run("Close");
close("local_threshold");
selectImage("indexes");
setSlice(1);
run("glasbey_inverted");