Login  Register

Re: setting min, max from histogram

Posted by Karel Jansseune-2 on Apr 16, 2009; 10:43am
URL: http://imagej.273.s1.nabble.com/Re-setting-min-max-from-histogram-tp3692900p3692902.html


Dear,

you are correct, I tried it and it doesn't work.
i use construction a lot for other functions, but it now occurs to me that it can't be used in this case.

My mistake

The solution you suggest is indeed the correct one

Met vriendelijke groet,
Best regards,
Mit freundlichen Grüßen,


Karel Jansseune


Karel Jansseune
 
Bayer BioScience N.V.
Technologiepark 38
B-9052 Gent
Belgium

Ondernemingsnummer: BTW BE 0422 529 921 RPR Gent
E-Mail Karel.Jansseune@...
  URL http://www.bayercropscience.com
   
 




Gluender <[hidden email]>
Sent by: ImageJ Interest Group <[hidden email]>

16/04/2009 11:59

Please respond to
ImageJ Interest Group <[hidden email]>

To
[hidden email]
cc
Subject
Re: setting min, max from histogram





>On Thu, 16 Apr 2009 11:40:00 +0200, Donny George <[hidden email]>
>wrote:
>
>>On Thu, Apr 16, 2009 at 11:27 AM, Gluender <[hidden email]> wrote:
>>
>>>  hello
>>>>
>>>>  i would like to set the min and max values for brightness of an image
>by
>>>>  making some calculations from the values like mean and standard
>deviation
>>>>  obtained from the histogram of the image. i wrote the macro in this way
>>>>
>>>>  run("Brightness/Contrast...");
>>>>     getStatistics(mean, min, max, std, histogram);
>>>>
>>>>     setMinAndMax(mean*0.6666,201);
>>>>
>>>>  and this not work. could somehow help me to successfully modify this.
>>>>
>>>>  thank you one and all for the help in advance
>>>>
>>>>  regards
>>>>
>>>>  --
>>>>  Donny George
>>>>
>>>
>>>
>>>  I've replied to your question immediately after your first post to the
>>>  list.
>>>
>>>  ------------------------
>>>
>>>  Here is my reply again:
>>>
>>>  The macro functions manual says:
>>>  getStatistics(area, mean, min, max, std, histogram)
>>>
>>>  so
>>>
>>>  getStatistics(area, mean);
>>>  print(mean);
>>>
>>>  should do the trick.
>>>
>>>  HTH
>>>  --
>>>
>>>                   Herbie
>>>
>>>          ------------------------
>>>          <http://www.gluender.de>
>>>
>>
>>
>>thankyou and sorry i didnt see ur post earlier
>>
>>i modified it and i could print the values correctly but i am not able to
>>make a calculation with it so that i can modify the brightness
>>
>>run("Brightness/Contrast...");
>>     getStatistics(mean, min, max, std, histogram);
>>     print(""+mean+", "+min+", "+max+", "+std+"");
>>     setMinAndMax("+mean+"*0.6666,201);
>>
>>could you help me with the syntax for the mulplication
>>
>>thnkyou again
>>
>>Donny George
>>=========================================================================
>
>Dear Donny,
>
>changing you code to
>
>setMinAndMax("+getStatistics[mean]+"*0.6666,201);
>
>should do the trick
>
>
>Regards,
>
>Karel

This is a somewhat strange suggestion, did you try it?

--

                  Herbie

         ------------------------
         <http://www.gluender.de>


The information contained in this e-mail is for the exclusive use of the intended recipient(s) and may be confidential, proprietary, and/or legally privileged.  Inadvertent disclosure of this message does not constitute a waiver of any privilege.  If you receive this message in error, please do not directly or indirectly use, print, copy, forward, or disclose any part of this message.  Please also delete this e-mail and all copies and notify the sender.  Thank you.

For alternate languages please go to http://bayerdisclaimer.bayerweb.com