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 
Return to the default flat view Create a new topic Submit Reply
IDLgrPalette woes [message #48099] Tue, 28 March 2006 14:28 Go to previous 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
[Message index]
 
Read Message
Read Message
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 06:26:45 PDT 2025

Total time taken to generate the page: 0.64004 seconds