Login  Register

Logging pixel counts

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

Logging pixel counts

Hannah C
1 post
Hi there

I am very new to to image j

My problem is that I have a load (5447) of 8 bit images and need to record the name of the image file and the count of the 139 grey value (row 140 of 256) in a single output table.

Thanks

Hannah
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Logging pixel counts

Rasband, Wayne (NIH/NIMH) [E]
1064 posts
On Nov 26, 2012, at 3:26 PM, Hannah C wrote:

> Hi there
>
> I am very new to to image j
>
> My problem is that I have a load (5447) of 8 bit images and need to record
> the name of the image file and the count of the 139 grey value (row 140 of
> 256) in a single output table.

Run Process>Batch>Macro, click "Input..." and select the directory containing the files, paste

  if (i==0)
     print("\\Clear");
  getRawStatistics(n,mean,min,max,sd,hist);
  print(getTitle+"\t "+hist[139]);

into the macro box, then press "Process". When finished, use the "Log" window's File>Save As command to save the table.

-wayne

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

Re: Logging pixel counts

Richard VanMetter
27 posts
In reply to this post by Hannah C
Wayne, is "i" a running index used in Batch>Macro used to track the
number of images that have been processed? Is it automatically incremented?

    Run Process>Batch>Macro, click "Input..." and select the directory
    containing the files, paste
         if (i==0)
            print("\\Clear");
         getRawStatistics(n,mean,min,max,sd,hist);
         print(getTitle+"\t "+hist[139]);
    into the macro box, then press "Process". When finished, use the
    "Log" window's File>Save As command to save the table.

    -wayne

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