Posted by
Mike Cowperthwaite on
Jan 14, 2010; 7:34pm
URL: http://imagej.273.s1.nabble.com/extracting-pixels-value-from-an-image-tp3689482p3689484.html
That will certainly work to print out a list, but I have to say: I
cannot imagine any real situation where such a list would be actually
useful. No human wants to read a big bunch of numbers, and the
printed-out version is of no use to the computer.
Broadly speaking, the binary image *is* a list of the pixels. (Yes, I
know, it's an array not a list; shut up, geeks.) The real question is,
what purpose would such a list be put to? Better advice can be
dispensed with a proper understanding of the problem.
On 14-Jan-10 9:56 am, David Webster wrote:
> Hmm! Someone asked a question like this a few weeks ago. I don't know about
> existing plugins, but you can convert the code below to a macro. Do
> Plugins/New/Macro, paste the code into the macro edit window, and then run
> it using Macro/Run Macro.
>
> for(x=0;x<getWidth();x++)
> {
> for(y=0;y<getHeight();y++)
> {
> value = getPixel(x,y);
> print(x,y,value);
> }
> }
>
>
> On Thu, Jan 14, 2010 at 6:14 AM, rona baron wrote:
>
>> Hi all,
>>
>> I used the thershold command to classify and count cells on my image. Then
>> I converted it into binary image (so all the objectes are set to 1...)
>> I would like to have a list with the pixels location and its intensity (1
>> or 0).
>> How do I do it?
--
Mike Cowperthwaite
Lathrop Engineering, San Jose CA