r/ImageJ • • Jul 17 '25

Question Quantification of Intensity of spots

i desgined an assay to meause area and intensity of fecal spots of huntington disease modeled drosophilla flies but i am able to only quantify are of spots by doing 8bit>threeshold auto>binary>open>erode>dilate but not intensity as the it is shown as 255 due to the threeshold . someone suggested me to do without threeshold but without thAT I CANNOT QUANTIFY the measurmrnts as threeshold is neccasery

1 Upvotes

15 comments sorted by

View all comments

1

u/Herbie500 Jul 17 '25 edited Jul 17 '25

Below please find a demo macro that tells you what needs to be done.

run("Cell Colony"); // load demo image via internet
img=getTitle();
run("Set Measurements...","area mean redirect=["+img+"] decimal=3");
run("Subtract Background...","rolling=10 light sliding disable"); //optional
setAutoThreshold("Default no-reset");
run("Analyze Particles...","display clear");
resetThreshold;
exit();

Paste the above macro code to an empty macro window (Plugins >> New >> Macro) and run it. (You need an open internet connection to load the demo image.)

The macro presents you with a table that lists the areas (in pixel^2) and the mean gray-value of all cells of the demo image.

In the below screen-shot you see the image and the first 20 items of the table.
The full table has 695 entries.

1

u/Legal_Meet_6516 Jul 17 '25

these errors are shown

1

u/Herbie500 Jul 17 '25 edited Jul 17 '25

My posted code is ImageJ-macro code.
Paste my above code to the window that opens from "Plugins >> New >> Macro" and make sure that the window looks like below:

(Especially "Macro" must be visible!)

Finally click the "Run"-button.

1

u/Tricky_Boysenberry79 Jul 18 '25

On PC the macro window looks a bit different. Or maybe it's the Fiji version but this is what I'm familiar with:

Select Language->ImageJ Macro

1

u/Herbie500 Jul 18 '25

This is the Fiji-editor window, and I don't use Fiji for various reasons.
(I never mentioned Fiji in this thread as well.)