comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » CT image without scaling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
CT image without scaling [message #91980] Thu, 24 September 2015 08:12 Go to next message
Dete van Eeden is currently offline  Dete van Eeden
Messages: 32
Registered: July 2015
Member
Hi

How can I display a CT image on idl without it being scaled to 0,255?

Thank you
Re: CT image without scaling [message #91981 is a reply to message #91980] Thu, 24 September 2015 08:41 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dete van Eeden writes:

> How can I display a CT image on idl without it being scaled to 0,255?

I'd try:

TV, image

Or, if the data is not in the range 0 to 255 already, scale it yourself
with BytScl to whatever range you want within the values 0 to 255
required to put an image on the display.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: CT image without scaling [message #91982 is a reply to message #91981] Thu, 24 September 2015 08:59 Go to previous messageGo to next message
Dete van Eeden is currently offline  Dete van Eeden
Messages: 32
Registered: July 2015
Member
On Thursday, September 24, 2015 at 5:41:56 PM UTC+2, David Fanning wrote:
> Dete van Eeden writes:
>
>> How can I display a CT image on idl without it being scaled to 0,255?
>
> I'd try:
>
> TV, image
>
> Or, if the data is not in the range 0 to 255 already, scale it yourself
> with BytScl to whatever range you want within the values 0 to 255
> required to put an image on the display.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Thank you, the values range from 1000 to -1000 since it is a CT image and it is displayed in hounsfield units

how many greyscale values will tv, image display?
Re: CT image without scaling [message #91983 is a reply to message #91982] Thu, 24 September 2015 09:00 Go to previous messageGo to next message
Dete van Eeden is currently offline  Dete van Eeden
Messages: 32
Registered: July 2015
Member
On Thursday, September 24, 2015 at 5:59:12 PM UTC+2, Dete van Eeden wrote:
> On Thursday, September 24, 2015 at 5:41:56 PM UTC+2, David Fanning wrote:
>> Dete van Eeden writes:
>>
>>> How can I display a CT image on idl without it being scaled to 0,255?
>>
>> I'd try:
>>
>> TV, image
>>
>> Or, if the data is not in the range 0 to 255 already, scale it yourself
>> with BytScl to whatever range you want within the values 0 to 255
>> required to put an image on the display.
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
> Thank you, the values range from 1000 to -1000 since it is a CT image and it is displayed in hounsfield units
>
> how many greyscale values will tv, image display?

But How do I display the image in this new rescaled values alain?
Re: CT image without scaling [message #91984 is a reply to message #91982] Thu, 24 September 2015 09:07 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dete van Eeden writes:

>
> On Thursday, September 24, 2015 at 5:41:56 PM UTC+2, David Fanning wrote:
>> Dete van Eeden writes:
>>
>>> How can I display a CT image on idl without it being scaled to 0,255?
>>
>> I'd try:
>>
>> TV, image
>>
>> Or, if the data is not in the range 0 to 255 already, scale it yourself
>> with BytScl to whatever range you want within the values 0 to 255
>> required to put an image on the display.
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
> Thank you, the values range from 1000 to -1000 since it is a CT image and it is displayed in hounsfield units
>
> how many greyscale values will tv, image display?

All non-true-color images are displayed with values ranging from 0 to
255. Often, with CT and other medical images, you want to "window and
level" the image.

Here are a couple of articles you might find helpful:

http://idlcoyote.com/ip_tips/xstretch.php
http://www.idlcoyote.com/ographics_tips/contrastzoom.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: CT image without scaling [message #91985 is a reply to message #91983] Thu, 24 September 2015 09:14 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
> But How do I display the image in this new rescaled values alain?

The image function in the statement "im = image(your-image_array)" will open a window on your screen. The variable "im" is the corresponding IDL graphics object.
Changing any of its property (like MIN_VALUE) will dynamically change the display. For instance, doing im.MIN_VALUE=-500 will redisplay your image in range [-500,1000], then doing im.MAX_VALUE=500, in range [-500,500].
IDL himself adjusts automatically the 256 available grayscale levels behind the scene.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Plot
Next Topic: Breaking a large program file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:44:15 PDT 2025

Total time taken to generate the page: 0.00426 seconds