Login  Register

help with outdated macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

help with outdated macro

Elyse Aurbach
2 posts
Hello,

My lab uses ImageJ to quantify greyscale images. I joined the lab and
inherited the attached macro to help take background measurements The macro
was written in 2005, and with ImageJ version 1.34h through versions
1.44p-ish, this macro is sufficient to measure what my lab calls the
"background" of a selection in the image, then threshold the image such
that the "signal" is defined as the mean of the selection plus 3.5 times
the standard deviation of the selection. From there, in the earlier
versions, the macro then calls the Threshold function to set a mask on the
image, such that only pixels with an intensity value above the "signal"
threshold are included in subsequent measurements. The issue is that this
macro does not work the same way in newer versions of ImageJ--the macro
works fine to set the threshold value, but the mask is never created. Is
this a matter of the source Threshold function changing? Is there a second
"mask" function that should be called? Is there something I'm not seeing?

Many thanks for any and all help with this issue!

All the best,
Elyse Aurbach

--
Elyse L. Aurbach
Ph.D. Candidate, Akil Lab
Molecular and Behavioral Neuroscience Institute
Neuroscience Graduate Program
University of Michigan, Ann Arbor, MI

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

testBackgroundCorrectedDensity.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: help with outdated macro

Gabriel Landini
1783 posts
On Monday 10 Jun 2013 19:56:15 Elyse Aurbach wrote:

> Hello,
>
> My lab uses ImageJ to quantify greyscale images. I joined the lab and
> inherited the attached macro to help take background measurements The macro
> was written in 2005, and with ImageJ version 1.34h through versions
> 1.44p-ish, this macro is sufficient to measure what my lab calls the
> "background" of a selection in the image, then threshold the image such
> that the "signal" is defined as the mean of the selection plus 3.5 times
> the standard deviation of the selection. From there, in the earlier
> versions, the macro then calls the Threshold function to set a mask on the
> image, such that only pixels with an intensity value above the "signal"
> threshold are included in subsequent measurements. The issue is that this
> macro does not work the same way in newer versions of ImageJ--the macro
> works fine to set the threshold value, but the mask is never created. Is
> this a matter of the source Threshold function changing? Is there a second
> "mask" function that should be called? Is there something I'm not seeing?

You are probably missing the "Standard deviation" box ticked in
Analyze>Set Measurements.
If it is not ticked, then the value is not extracted and you cannot compute
the background value.

Cheers
Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: help with outdated macro

Elyse Aurbach
2 posts
Hi Gabriel,

Thanks so much for your reply! My 'Standard deviation' box is indeed
checked--and when I visually look at the Threshold box, the appropriate
bounds have been placed on the intensity histogram after using the macro.
But the mask doesn't appear over the thresholded image--and if I take a
measurement without manually adjusting the mask, it returns null values. I
really appreciate your help--do you have any other ideas I can try?

Many thanks!

Elyse


On Mon, Jun 10, 2013 at 4:57 PM, Gabriel Landini <[hidden email]>wrote:

> On Monday 10 Jun 2013 19:56:15 Elyse Aurbach wrote:
> > Hello,
> >
> > My lab uses ImageJ to quantify greyscale images. I joined the lab and
> > inherited the attached macro to help take background measurements The
> macro
> > was written in 2005, and with ImageJ version 1.34h through versions
> > 1.44p-ish, this macro is sufficient to measure what my lab calls the
> > "background" of a selection in the image, then threshold the image such
> > that the "signal" is defined as the mean of the selection plus 3.5 times
> > the standard deviation of the selection. From there, in the earlier
> > versions, the macro then calls the Threshold function to set a mask on
> the
> > image, such that only pixels with an intensity value above the "signal"
> > threshold are included in subsequent measurements. The issue is that this
> > macro does not work the same way in newer versions of ImageJ--the macro
> > works fine to set the threshold value, but the mask is never created. Is
> > this a matter of the source Threshold function changing? Is there a
> second
> > "mask" function that should be called? Is there something I'm not seeing?
>
> You are probably missing the "Standard deviation" box ticked in
> Analyze>Set Measurements.
> If it is not ticked, then the value is not extracted and you cannot compute
> the background value.
>
> Cheers
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Elyse L. Aurbach
Ph.D. Candidate, Akil Lab
Molecular and Behavioral Neuroscience Institute
Neuroscience Graduate Program
University of Michigan, Ann Arbor, MI

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: help with outdated macro

Gabriel Landini
1783 posts
On Monday 10 Jun 2013 22:01:20 Elyse Aurbach wrote:
> My 'Standard deviation' box is indeed
> checked--and when I visually look at the Threshold box, the appropriate
> bounds have been placed on the intensity histogram after using the macro.
> But the mask doesn't appear over the thresholded image--and if I take a
> measurement without manually adjusting the mask, it returns null values. I
> really appreciate your help--do you have any other ideas I can try?

After checking Standard Deviation, the macro works here (shows a thresholded
range in red) with the Dot Blot image (IJ v 1.47u1 linux 64 bit).
Have you tried updating to the daily build? Tried on a different computer?
Sorry I have no further suggestions.
Regards
Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html