How to cluster the subset of the analyzed particle using Biovoxxel cluster indicator

fiji
analyze-particles
imagej
macro
biovoxxel

#1

I have the following raw image:

my_image

And with this code:

infile = "my_data.tif";

open(infile);
run("Enhance Contrast...", "saturated=0.7");
setAutoThreshold("MaxEntropy");
run("Threshold...");
setThreshold(0, 102); 

circular_threshold = 0.7;
size_threshold =  0.00045;
run("Analyze Particles...", "size=" + size_threshold + "-Infinity circularity=" + circular_threshold +"-Infinity display clear include summarize add in_situ");
selectWindow("ROI Manager");
roiManager("Show All without labels");
roiManager("Set Fill Color", "blue");

selectWindow("my_data.tif");
run("Flatten");
saveAs("Jpeg", "/Users/ewijaya/Desktop/try_fiji/my_data.captured.jpg");


// Closing unnecessary windows
selectWindow("Summary");
run("Close");
selectWindow("Threshold");
run("Close");
selectWindow("Results");
run("Close");
selectWindow("ROI Manager");
run("Close");
selectWindow("my_data.tif");
run("Close");
selectWindow("my_data.captured.jpg");
run("Close");

I can make this image:

captured

What I want to do is to perform Biovoxxel Clustering only on the BLUE particle.

At the end of the day I’d like to report the count the blue particles inside each cluster.

How can I do that?


#2

Dear @Peverall_Dubois,

to run the cluster indicator on the image you need it as an 8-bit binary image. So, in your macro code at the position when you run the particle analyzer…

…you can create that by changing the line into the following

run("Analyze Particles...", "size=" + size_threshold + "-Infinity circularity=" + circular_threshold +"-Infinity show=Masks display clear include summarize add in_situ");

On the masks image you can simply run the cluster indicator and record its settings.

Hope this helps.


How to binarize an image based on selected color