measuring intensities

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

measuring intensities

Richard Murray-3
I'm a new user of image j and I'm wondering if anyone knows if it's possible to
measure the intensity of each individual pixel in an image that you want to anal
yse? How can it be done?

Thanks guys,
Richard Murray

Richard Murray BSc.
Nanos
cale Biophotonics Research Group,
National Centre for Biomedical Engineering Sci
ences,
National University of Ireland, Galway,
Phone: +353-91-524411 ext.5186
Em
ail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: measuring intensities

S.I. Rusu
> I'm a new user of image j and I'm wondering if anyone knows if it's
> possible to
> measure the intensity of each individual pixel in an image that you want
> to anal
> yse? How can it be done?
>

  The macro below might help:


 h=getHeight();
 w=getWidth();
 for (a=0; a<w; a++){
     for (b=0; b<h; b++){
          makeRectangle(a, b, 1, 1);
          run("Measure");
     }
 }


   Regards,

--
Silviu Rusu, Ph.D.
Erasmus MC Rotterdam
Ee 1230
Tel: +31 10 46 38094
Fax: +31 10 40 89459
Dr. Molewaterplein 50
NL-3015 GE Rotterdam
email: [hidden email]
web: http://www2.eur.nl/fgg/neuro/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: measuring intensities

vytas-2
Not sure of the real question being asked, but placing the cursor over a
pixel will read out the values in the ImageJ mssg field. If the intent was
to list all the pixel intensities, it seems that "save as/ text image "
option is the fastest route vs the 1-pixel region  of interests (ROI)
approach below.
         Selecting a ROI and using MEASURE is more common (built-in
statistics vs spreadsheets). Listing values within ROI can be done with
macros (see ImageJ macro links)


At 05:55 8/9/2005, you wrote:

> > I'm a new user of image j and I'm wondering if anyone knows if it's
> > possible to
> > measure the intensity of each individual pixel in an image that you want
> > to anal
> > yse? How can it be done?
> >
>
>   The macro below might help:
>
>
>  h=getHeight();
>  w=getWidth();
>  for (a=0; a<w; a++){
>      for (b=0; b<h; b++){
>           makeRectangle(a, b, 1, 1);
>           run("Measure");
>      }
>  }
>
>
>    Regards,
>
>--
>Silviu Rusu, Ph.D.
>Erasmus MC Rotterdam
>Ee 1230
>Tel: +31 10 46 38094
>Fax: +31 10 40 89459
>Dr. Molewaterplein 50
>NL-3015 GE Rotterdam
>email: [hidden email]
>web: http://www2.eur.nl/fgg/neuro/

Vytas Bindokas, Ph.D.
Research Assoc. / Assoc. Prof.,
Director, BSD Light Microscopy Core Facility
Dept Neurobiol Pharmacol Physiol MC0926
947 E 58th Street
The University of Chicago
Chicago IL 60637
Room J246A (SBRI)

773-834-9040
fax 773-702-5903
email [hidden email]
  web site for LMCF:
http://digital.bsd.uchicago.edu/index.html 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: measuring intensities

Richard Murray-3
In reply to this post by Richard Murray-3
Hi, my intention is to measure the intenisty of each individual pixel without ha
ving to select each individual pixel by hand. i.e as if each pixel were a sepera
te element in a matrix, I want to know the value of each individual element in t
he matrix.

I hope this explains my problem more,

Thanks,
Richard
=============
=Original message text===============
On Tue, 09 Aug 2005 12:32:18 +0100 vytas w
rote:

Not sure of the real question being asked, but placing the cursor over a

pixel will read out the values in the ImageJ mssg field. If the intent was
to
list all the pixel intensities, it seems that "save as/ text image "
option is
the fastest route vs the 1-pixel region  of interests (ROI)
approach below.
   
      Selecting a ROI and using MEASURE is more common (built-in
statistics vs
spreadsheets). Listing values within ROI can be done with
macros (see ImageJ ma
cro links)


At 05:55 8/9/2005, you wrote:
> > I'm a new user of image j and I'm
 wondering if anyone knows if it's
> > possible to
> > measure the intensity of
each individual pixel in an image that you want
> > to anal
> > yse? How can it
be done?
> >
>
>   The macro below might help:
>
>
>  h=getHeight();
>  w=getWid
th();
>  for (a=0; a<w; a++){
>      for (b=0; b<h; b++){
>           makeRectan
gle(a, b, 1, 1);
>           run("Measure");
>      }
>  }
>
>
>    Regards,
>
>
--
>Silviu Rusu, Ph.D.
>Erasmus MC Rotterdam
>Ee 1230
>Tel: +31 10 46 38094
>Fax
: +31 10 40 89459
>Dr. Molewaterplein 50
>NL-3015 GE Rotterdam
>email: s.rusu@er
asmusmc.nl
>web: http://www2.eur.nl/fgg/neuro/

Vytas Bindokas, Ph.D.
Research A
ssoc. / Assoc. Prof.,
Director, BSD Light Microscopy Core Facility
Dept Neurobio
l Pharmacol Physiol MC0926
947 E 58th Street
The University of Chicago
Chicago I
L 60637
Room J246A (SBRI)

773-834-9040
fax 773-702-5903
email [hidden email]
chicago.edu
  web site for LMCF:
http://digital.bsd.uchicago.edu/index.html 
===
========End of original message text===========



Richard Murray BSc.
Nanoscale
 Biophotonics Research Group,
National Centre for Biomedical Engineering Science
s,
National University of Ireland, Galway,
Phone: +353-91-524411 ext.5186
Email:
 [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: measuring intensities

Parker Seidel
Richard,

What you want to do is pretty straight forward.  I assume you want to
get the pixel value (intensity) at some x, y.  I'm not sure if you're
more familiar with the Macro language or the Java API, but in either
case the solution is simple.  To me, these are the simplest
demonstrations on how to do this.

Macro

for (x=0;x<getWidth(); x++)
{
    for(y=0;y<getHeight(); y++)
    {
         Intensity = getPixel(x,y);
         print(Intensity);
     }
}


In Java as a plugin:  (getPixelValue could also be used, but I don't
know how it differs from getPixel)

        public void run(String arg) {
                ImagePlus imp = WindowManager.getCurrentImage();
                ImageProcessor ip = imp.getProcessor();
                for (int x = 0; x < ip.getWidth(); x++)
                {
                        for(int y = 0;y < ip.getHeight(); y++)
                        {
                                int Intensity = ip.getPixel(x,y);
                                IJ.log("" +Intensity);  /* without the "", IJ.log doesn't convert
ints to Strings */
                        }
                }
        }

Parker Seidel
Loading...