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

Home » Public Forums » archive » IDLgrPalette woes
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
IDLgrPalette woes [message #48099] Tue, 28 March 2006 14:28 Go to next message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Hi Everyone,

What happens when you leave IDL programming for a few months and then
try to jump back into it? Well, the results aren't pretty. Hopefully
some of you will have the mental oil needed to make these IDL gears turn
again.

I simply want to display an image in living color using Object Graphics.
However, when I change the palette associated with the image, my image
goes all white. If I leave the palette alone (or load color table 0) I
will see the standard gray-scale colors. The following code demonstrates:

; Set up objects
window = obj_new('IDLgrWindow', DIMENSIONS = [100, 100])
view = obj_new('IDLgrView', VIEWPLANE_RECT = [0, 0, 100, 100])
model = obj_new('IDLgrModel')
image = obj_new('IDLgrImage', bytscl(dist(100)))
palette = obj_new('IDLgrPalette')

view -> add, model
model -> add, image
image -> setProperty, PALETTE = palette

; Load color table and display
palette -> LoadCT, 0
window -> draw, view

; At this point, the pattern looks as it should.


; Load a nice colorful table and display
palette -> LoadCT, 39
window -> draw, view

; Ack!! The entire plot is white. Where's the image?!


Further investigation has shown that I get this "whiteout" ANY time I
set the color table to a value other than 0. I also get this same
effect if I set any of red_values, green_values or blue_values of the
IDLgrPalette explicitly. I just want to add a little color to my plots,
but I can't for the life of me figure this one out.

-Mike
Re: IDLgrPalette woes [message #48180 is a reply to message #48099] Wed, 29 March 2006 09:08 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Just a follow up to my earlier message. I don't know if anyone at RSI
is interested in such things, but here it is just in case. I have
several workarounds and I don't use IDLgrWindow that often, so it's
really no big deal for me.

I don't know when the problem started because I don't use IDLgrWindow
that often. Most of my IDL code processes things off-line so there's no
need to display an image to the user. Anyway, the only time the "white
out" occurs is if I use hardware rendering in an IDLgrWindow. Software
rendering is fine. I have had no problems using an IDLgrBuffer and then
either displaying the image in direct graphics or saving it to a file.

I'm using Fedora Core 4 and have an "old" ATI Radeon Mobility 7500
graphics card. This card is one which ATI no longer supports and the
only Linux drivers available come via the DRI project. I'm currently
running Fedora Core 4 with X.org 6.8.2 and using IDL 6.2. I don't know
if there was an update to X.org or to the DRI driver that would have
caused this, but that's the only thing I can figure. ATI stopped
supporting the Radeon 7500 a while back, so I know that I must have been
using the DRI driver for some time, but this is the first time I can
remember seeing such a problem.

Anyway, there's the scoop for what it's worth. Now, I'll go back to
making my pretty plots. :-)

-Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: printing an array from pointers
Next Topic: Re: map_set, !map, !x, !p.position (and behind this curtain, !x.*)

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

Current Time: Fri Oct 10 16:31:39 PDT 2025

Total time taken to generate the page: 1.04385 seconds