setting WindowWidth and WindowCenter values

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

setting WindowWidth and WindowCenter values

Prashant-2-3
Hi everyOne,

         I want to change the window width and window center of the image.
         I am opening my dicom images through ij.jar.
         Actually i want to change window Level values through mouseDragged event.
         Then which method i have to call.
       
         I am currently using ip.setMinAndMax() method.
         But i am not getting it sets which min and min.

If our image is Signed then

                                    min           max
Window Width range = 1     to     2^(High Bit value)
Window Center range = 1    to     2^(High Bit value)

If our image is UnSigned then

                                       min           max
Window Width range =   1     to     2^(High Bit value)
Window Center range =  - 2^(High Bit value)/2    to     +2^(High Bit value)/2

So if i using ip.setMinAndMax(min,max) then is it WindowWidth or WindowCenter min and Max?
Please clarify if i wrong about their range.

So please help me how i set Window Width and Window Center values of image.
It is same as you are setting slider min and max in W&L window.




         



 
With Warm Regards
--------------------------------------------------------------------

Prashant Chandrakar
Software Developer
MedSynaptic Pvt Ltd
9270710943
[hidden email]
 
"If the facts don't fit the theory, change the facts."
Reply | Threaded
Open this post in threaded view
|

Re: setting WindowWidth and WindowCenter values

Wayne Rasband
Use

     setMinAndMax(level-window/2, level+window/2);

to set the window (window width) and level (window center) of an image.

-wayne

On Oct 11, 2008, at 7:54 AM, prashant wrote:

> Hi everyOne,
>
>          I want to change the window width and window center of the  
> image.
>          I am opening my dicom images through ij.jar.
>          Actually i want to change window Level values through  
> mouseDragged event.
>          Then which method i have to call.
>
>          I am currently using ip.setMinAndMax() method.
>          But i am not getting it sets which min and min.
>
> If our image is Signed then
>
>                                     min           max
> Window Width range = 1     to     2^(High Bit value)
> Window Center range = 1    to     2^(High Bit value)
>
> If our image is UnSigned then
>
>                                        min           max
> Window Width range =   1     to     2^(High Bit value)
> Window Center range =  - 2^(High Bit value)/2    to     +2^(High  
> Bit value)/2
>
> So if i using ip.setMinAndMax(min,max) then is it WindowWidth or  
> WindowCenter min and Max?
> Please clarify if i wrong about their range.
>
> So please help me how i set Window Width and Window Center values  
> of image.
> It is same as you are setting slider min and max in W&L window.
>
>
>
>
>
>
>
>
>
> With Warm Regards
> --------------------------------------------------------------------
>
> Prashant Chandrakar
> Software Developer
> MedSynaptic Pvt Ltd
> 9270710943
> [hidden email]
>
> "If the facts don't fit the theory, change the facts."
Reply | Threaded
Open this post in threaded view
|

Re: setting WindowWidth and WindowCenter values

Prashant-2-3
Thanks for your reply.

              But how i calculate the limit,i.e. min and max of any image.
         As i mentioned in my previous mail.
         One more thing,Suppose i have to set Window Width and center
(150,40)
        Then i have to pass setminAndMax(150,40) is it ok?
        or setMinAndMax((150-40/2),(150+40)/2)
        Please correct me.


----- Original Message -----
From: "Rasband Wayne" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, October 11, 2008 7:53 PM
Subject: Re: setting WindowWidth and WindowCenter values


> Use
>
>     setMinAndMax(level-window/2, level+window/2);
>
> to set the window (window width) and level (window center) of an image.
>
> -wayne
>
> On Oct 11, 2008, at 7:54 AM, prashant wrote:
>
>> Hi everyOne,
>>
>>          I want to change the window width and window center of the
>> image.
>>          I am opening my dicom images through ij.jar.
>>          Actually i want to change window Level values through
>> mouseDragged event.
>>          Then which method i have to call.
>>
>>          I am currently using ip.setMinAndMax() method.
>>          But i am not getting it sets which min and min.
>>
>> If our image is Signed then
>>
>>                                     min           max
>> Window Width range = 1     to     2^(High Bit value)
>> Window Center range = 1    to     2^(High Bit value)
>>
>> If our image is UnSigned then
>>
>>                                        min           max
>> Window Width range =   1     to     2^(High Bit value)
>> Window Center range =  - 2^(High Bit value)/2    to     +2^(High  Bit
>> value)/2
>>
>> So if i using ip.setMinAndMax(min,max) then is it WindowWidth or
>> WindowCenter min and Max?
>> Please clarify if i wrong about their range.
>>
>> So please help me how i set Window Width and Window Center values  of
>> image.
>> It is same as you are setting slider min and max in W&L window.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> With Warm Regards
>> --------------------------------------------------------------------
>>
>> Prashant Chandrakar
>> Software Developer
>> MedSynaptic Pvt Ltd
>> 9270710943
>> [hidden email]
>>
>> "If the facts don't fit the theory, change the facts."
>