Login  Register

Antwort: gray scale value?

Posted by Joachim Wesner on Jun 04, 2008; 6:47am
URL: http://imagej.273.s1.nabble.com/gray-scale-value-tp3696027p3696028.html

Hi Sasmita!

this is a bit confusing! Dou you want to read pixel values from a regular
binary image file (.TIF or whatever) or from a *TEXT* file that specifies
pixel by pixel?

In can of an image loaded into ImageJ, you can use

>getPixel(x, y)
>Returns the value of the pixel at (x,y). Note that pixels in RGB images
contain red, green and blue components that need to be
>extracted using shifting and masking. See the Color Picker Tool macro for
an example that shows how to do this.

in a loop inside a macro. Please lookup the documentation

http://rsb.info.nih.gov/ij/docs/ImageJMacroLanguage.pdf

Cheers

Joachim


Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht
Wetzlar  HRB 2432
Geschäftsführer:  Dr. Stefan Traeger | Dr. Wolf-Otto Reuter | Dr. David Roy
Martyr | Colin Davis

ImageJ Interest Group <[hidden email]> schrieb am 03.06.2008 23:07:55:

> Hello Friends,
> I'm writing a macro in which I want to read my program the pixel
> level gray scale values.I run the program to open the text file.But
> I can't figure out how to read each single pixel
>
> value. Basically I'm asking if there is a command in ImageJ that
> reads those value automatically.
>
> Could anyone please help?
>
> Thanks,
> Sasmita


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________