Posted by
Prashant-2-3 on
Oct 21, 2008; 5:25am
URL: http://imagej.273.s1.nabble.com/how-to-calculate-min-and-max-of-images-tp3694676p3694679.html
Hi,
Thanks for you reply,
Actually its very different for signed and unsigned images.
currently i derive a formula which is reverse of those formula which
calculates window width and window center from min and max.
i.e it calculate min and max from window width and center
see
min - max = WW -------eq1
(max + min)/2 = WC ----- eq2
So finally by solving these equations we get
min = (2 * WC - WW)/2
max = WW + min
So if i want to adjust WW = 1880 and WC = 950
then by formula
min = (2 * 950 - 1880)/2 = 10
max =1880 + 10 = 1890
but image is not looking good respetive to my min and max.
Please tell are i am doing anything wrong?
----- Original Message -----
From: "Robert Dougherty" <
[hidden email]>
To: <
[hidden email]>
Sent: Monday, October 20, 2008 8:28 PM
Subject: Re: how to calculate min and max of images
Prashant,
If you are asking an algebra question, the answer is
Min = WindowCenter - WindowWidth/2;
Max = WindowCenter + WindowWidth/2;
You can derive this graphically or by solving the simultaneous equations you
gave.
(In the example, should it read (Max - Min) = 32883 - (-32733) = 65616 ?)
Bob
Robert P. Dougherty, Ph.D.
President, OptiNav, Inc.
Phone (425) 990-5912
Fax (425) 467-1119
www.optinav.com
> WindowCenter = (Max + Min)/2 = (32883 -32733)/2 = 150/2 = 75
> WindowWidth = (Max - Min) = 32
> But How to calculate min and max from Window Width and window center.
>
>