Re: Problem displaying images on 8 bit monitor [message #50561 is a reply to message #50559] |
Tue, 10 October 2006 05:55   |
mark
Messages: 28 Registered: September 1992
|
Junior Member |
|
|
Hello,
This is how my !d system variable looks like (see below). Isn't it a
bit strange that the N_COLORS variable says 16.7 million whereas in
Windows systems settings, the graphic card is set to 8 bits? There is
another graphic card for a normal monitor, which is inactivated but may
this be influencing the idl settings..?
help, /structure, !d
** Structure !DEVICE, 17 tags, length=84, data length=84:
NAME STRING 'WIN'
X_SIZE LONG 256
Y_SIZE LONG 256
X_VSIZE LONG 256
Y_VSIZE LONG 256
X_CH_SIZE LONG 7
Y_CH_SIZE LONG 10
X_PX_CM FLOAT 54.0000
Y_PX_CM FLOAT 96.0000
N_COLORS LONG 16777216
TABLE_SIZE LONG 256
FILL_DIST LONG 1
WINDOW LONG 3
UNIT LONG 0
FLAGS LONG 328124
ORIGIN LONG Array[2]
ZOOM LONG Array[2]
Jo Klein skrev:
> Hi Mark,
> This reminds me of colour allocation issues that were present in ancient
> UNIX environments, where the number of colours allocated to IDL was
> limited by a number of factors. I think Windows will reserve a number of
> colours on an 8 bit device for its own purposes, such as window
> decorations. Is there an option to increase the number of colours for
> your graphics card? What are the contents of the !d variable? In
> particular, !d.colors? What happens when you try to display a window
> with window,colors=256? Do you run your monitor as a dual-head display,
> or is it mirroring the contents of your primary monitor?
> Just a few wild guesses,
> Jo
>
> mark wrote:
>> Hi David,
>>
>> Here are how the images look. Both of these images are of the same
>> variable:
>> bytscl(bindgen(256) # bindgen(256))
>>
>> This first image is how it should look, and it does using other display
>> programs on my monitor:
>>
>> http://hem.passagen.se/fysikern/idl/normal_display.tif
>>
>> This image is a screen-capture using TVRD() of the same variable
>> displayed in IDL using either TV and TVSCL.
>>
>> http://hem.passagen.se/fysikern/idl/idl_display.tif
>>
>>
>> The monitor I have is a CRT high-resolution mammography monitor (around
>> 1500x2500 pixels)
>>
>> Any helpful hints?
>>
>>
>> Mark
>>
>>
>>
>> mark skrev:
>>
>>
>>> Hi David,
>>>
>>> Thanks for you responses yesterday but I still can't get the images
>>> displayed properly. I'm sorry for insuating that IDL was at fault! :-)
>>> I'm sure I'm not doing something right...
>>>
>>> In response to your suggestions yesterday:
>>> TV, bindgen(256) # bindgen(256) yields a strange looking image (as
>>> expected)
>>>
>>> TVSCL, bindgen(256) # bindgen(256) gives me an image of the type I've
>>> been getting: a gradient consisting of narrow bands (or
>>> tiles/contours). There are about 30 such distinct bands along the
>>> gradient. I'm not sure if that number is significant. It would help if
>>> I could send you a screen-dump or something to show you what I mean.
>>>
>>> TV, bytscl(bindgen(256) # bindgen(256)) gives the same result as above
>>> with the bands.
>>>
>>> Byte scaling my own images doesn't change anything (they're already in
>>> byte format).
>>>
>>> So I'm still in the same situation...
>>>
>>>
>>> David Fanning skrev:
>>>
>>>
>>>> mark writes:
>>>>
>>>>
>>>> >So, there is something not set up right in my IDL environment...
>>>> >and I have no idea what it is...
>>>>
>>>> I rather doubt this. :-)
>>>>
>>>> Can you humor me? Try these commands:
>>>>
>>>> IDL> Loadct, 0
>>>>
>>>> Is this what you are seeing:
>>>>
>>>> IDL> TV, bindgen(256) # bindgen(256)
>>>>
>>>> What about this?
>>>>
>>>> IDL> TVSCL, bindgen(256) # bindgen(256)
>>>>
>>>> What about if you scale your image before you display it:
>>>>
>>>> IDL> TV, BytScl(image)
>>>>
>>>> Cheers,
>>>>
>>>> David
>>>> --
>>>> David Fanning, Ph.D.
>>>> Fanning Software Consulting, Inc.
>>>> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>>>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>>
>>
|
|
|