Posted by
Lee Berndt on
Sep 01, 2014; 2:06pm
URL: http://imagej.273.s1.nabble.com/Help-Please-tp5009424p5009443.html
Hi Greg....thank you for your reply.....I made my problem go away by using the following code:
getHistogram(values, counts, nBins);
for (i=0; i<nBins; i++) {
setResult("Value", row, values[i]);
setResult("Count", row, counts[i]);
row++;
}
updateResults();
m = (getResult("Count",0));
thanks again.....Lee
William L. Berndt, Ph.D.
239.246.0396
-----Original Message-----
From: James gregory (SANDWELL AND WEST BIRMINGHAM HOSPITALS NHS TRUST) <
[hidden email]>
To: IMAGEJ <
[hidden email]>
Sent: Mon, Sep 1, 2014 5:13 am
Subject: Re: Help Please
Hi,
I would use the 'getHistogram' macro function...
getHistogram(values, counts, nBins[, histMin, histMax])
Then the number of zero pixels is given by 'counts[0]'.
Greg.
________________________________________
From: ImageJ Interest Group [
[hidden email]] On Behalf Of Lee Berndt
[
[hidden email]]
Sent: 30 August 2014 22:44
To:
[hidden email]
Subject: Help Please
Greetings:
I've written a macro to help determine the area of injury to turfgrass (putting
greens)....the macro works great except for the very end....what I need to do is
to get the number of pixels in an image corresponding to count 0 of 256
(black)....I can get the total number of pixels in the image but need the value
for count 0 to create a percentage of black to all other pixels.....how do I get
that value? Any help is greatly appreciated....thank you.
William L. Berndt, Ph.D.
239.246.0396
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html********************************************************************************************************************
This message may contain confidential information. If you are not the intended
recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take
any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.
Thank you for your co-operation.
NHSmail is the secure email and directory service available for all NHS staff in
England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information
with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed
anywhere
********************************************************************************************************************
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html