Discussion:
Find Maxima
Declan James
2007-03-06 20:49:18 UTC
Permalink
Hello All I was hoping for a little help with ImageJ. I have been
experimenting with a range of plugins and various bits of Macro to analyse
some TIRF microscopy movies. I recently came across the Find Maxima
function it is great at picking out spots but seems to do it for single
planes at a time. Is it possible to apply the Find Maxima function to
stacks? Could these points or 'elliptical ROIs centered around maxima' be
generated and saved to a stack? It would then be important to plot a Z-
profile or obtain region measurments for each maxima for a user-defined
number of planes both forward and backward within the stack?

Any help is most welcomed.

Declan
Michael Schmid
2007-03-07 10:23:12 UTC
Permalink
Hi Declan,

Find Maxima does not work on stacks, but you can use a macro
that creates a stack:

input = getImageID();
n = nSlices();
for (i=1; i<=n; i++) {
selectImage(input);
setSlice(i);
run("Find Maxima...", "noise=5 output=[Single Points]");
if (i==1) {
output = getImageID();
} else {
run("Select All");
run("Copy");
close();
selectImage(output);
print("addslice");
run("Add Slice");
run("Paste");
}
}


Michael
________________________________________________________________
Post by Declan James
Hello All I was hoping for a little help with ImageJ. I have been
experimenting with a range of plugins and various bits of Macro to analyse
some TIRF microscopy movies. I recently came across the Find Maxima
function it is great at picking out spots but seems to do it for single
planes at a time. Is it possible to apply the Find Maxima function to
stacks? Could these points or 'elliptical ROIs centered around maxima' be
generated and saved to a stack? It would then be important to plot a Z-
profile or obtain region measurments for each maxima for a user-
defined
number of planes both forward and backward within the stack?
Any help is most welcomed.
Declan
samaher
2007-03-07 11:00:47 UTC
Permalink
Hello everyone,


I would really appreciate some feedback regarding the quantification
of in situ hybridization signals using ImageJ.

To quantify the grayness in a brain section, do you take the average
of the mean only? or would you consider the area as well?

I heard several ways to do it (listed below), please advise of the
right way. (It is giving me different results each).

1) choose your area,
2) set the threshold (to minimize background)
3) analyze particles,
4) sum area, sum Mean
5) replace in the exponential equation calculated from th c14
standard (replace the sum mean inside the exponential bracket), and
multiply the results with the sum area

A criticism been made to this way as it takes in account the area,
which makes the results biased according to different section.

So another method was suggested:
1) measure the mean of your area of interest (without thresholding).
2) measure the background mean
3) subtract the background mean from the area mean
4) use in your equation.


However, the results I am getting from the first reading is more
closer to the visual difference between groups which makes me believe
it is the right way, but I need to understand the math behind it.

Does the area consider the area of particles which will not make it
biased to your area of choice? Or would it still bias the results
even if it is the area of particles?? (the larger the area the more
particles presented).

Thank you in advance.

Samaher.
Declan James
2007-03-09 07:15:13 UTC
Permalink
Thanks Michael

The Macro worked a treat. It takes a bit of time with a stack of 1200
images and I had to change the noise=12 to suit my needs. Nevertheless the
results are brilliant. Thanks for a great plugin and macro.

About my second point in my original request, I am still stuck on how to get
ImageJ to report measurements (integrated OD) for all ROIs for the whole
stack. ImageJ seems to report only the values for the slice at which the
ROI was generated. I wish to obtain the values both before and after the
ROI marked by the find maxima. This would allow an analysis of the kinetics
of appearance and disappearance.

Thanks for any help


Declan
-----Original Message-----
From: ImageJ Interest Group [mailto:***@LIST.NIH.GOV] On Behalf Of
Michael Schmid
Sent: 07 March 2007 04:23
To: ***@LIST.NIH.GOV
Subject: Re: Find Maxima

Hi Declan,

Find Maxima does not work on stacks, but you can use a macro
that creates a stack:

input = getImageID();
n = nSlices();
for (i=1; i<=n; i++) {
selectImage(input);
setSlice(i);
run("Find Maxima...", "noise=5 output=[Single Points]");
if (i==1) {
output = getImageID();
} else {
run("Select All");
run("Copy");
close();
selectImage(output);
print("addslice");
run("Add Slice");
run("Paste");
}
}


Michael
________________________________________________________________
Post by Declan James
Hello All I was hoping for a little help with ImageJ. I have been
experimenting with a range of plugins and various bits of Macro to analyse
some TIRF microscopy movies. I recently came across the Find Maxima
function it is great at picking out spots but seems to do it for single
planes at a time. Is it possible to apply the Find Maxima function to
stacks? Could these points or 'elliptical ROIs centered around maxima' be
generated and saved to a stack? It would then be important to plot a Z-
profile or obtain region measurments for each maxima for a user-
defined
number of planes both forward and backward within the stack?
Any help is most welcomed.
Declan
Michael Schmid
2007-03-12 13:24:21 UTC
Permalink
Hi Declan,
Post by Declan James
The Macro worked a treat. It takes a bit of time with a stack of 1200
images and I had to change the noise=12 to suit my needs.
Nevertheless the
results are brilliant. Thanks for a great plugin and macro.
In the meanwhile, Wayne has significantly improved the macro
by adding the possibility of user input and put it to the
ImageJ Web site:
http://rsbweb.nih.gov/ij/macros/FindStackMaxima.txt
Post by Declan James
About my second point in my original request, I am still stuck on how to get
ImageJ to report measurements (integrated OD) for all ROIs for the whole
stack. ImageJ seems to report only the values for the slice at which the
ROI was generated. I wish to obtain the values both before and after the
ROI marked by the find maxima. This would allow an analysis of the kinetics
of appearance and disappearance.
This is a bit more difficult. You can use "Analyze Particles"
for each slice and save the Results as a text file, one for each
slice.
Then you will need your own program to find out which particles
are the same and which aren't, based on the position.
You could also do this in the macro, saving the positions of the
previous slice in two arrays for x&y, and then comparing all
positions of the current slice with those of the previous slice.
If there are many maxima, this will be rather slow, however, since
the macros are processed by an interpreter, which is slower than
a compiler.

Michael
________________________________________________________________
Post by Declan James
Post by Declan James
Hello All I was hoping for a little help with ImageJ. I have been
experimenting with a range of plugins and various bits of Macro to analyse
some TIRF microscopy movies. I recently came across the Find Maxima
function it is great at picking out spots but seems to do it for single
planes at a time. Is it possible to apply the Find Maxima
function to
stacks? Could these points or 'elliptical ROIs centered around maxima' be
generated and saved to a stack? It would then be important to plot a Z-
profile or obtain region measurments for each maxima for a user-
defined
number of planes both forward and backward within the stack?
Any help is most welcomed.
Declan
Gabriel Landini
2007-03-12 14:56:03 UTC
Permalink
Post by Declan James
About my second point in my original request, I am still stuck on how to get
ImageJ to report measurements (integrated OD) for all ROIs for the whole
stack.
Not sure if this helps, but you could use Particles8_Plus
(http://www.dentistry.bham.ac.uk/landinig/software/software.html ) which can
analyse stacks of particles and records the particle number and the stack in
the results table.
Among the many parameter that it can calculate, there is:

GrIntDen: Greyscale integrated density (the sum of the greyscale values in the
particle,

For this you need to analyse a binary image (or stack) and redirect the
measurements to a greyscale image (or stack).

Cheers,

G.

Loading...