changing the color map without having to re-load an image [message #29977] |
Wed, 03 April 2002 01:12  |
msauvage
Messages: 2 Registered: April 2002
|
Junior Member |
|
|
Hi there,
since I recently changed my work environment from an X-terminal
running on a solaris network to a mac on OSX with Xfree86, I'm
experiencing a strange problem with colors: I cannot modify the color
map (e.g. with xloadct, or by loading a new table with the command
line) and have these changes apply to the already displayed images.
The changes will only affect the images I load after the change.
I never experienced this problem in my previous configuration. The
problem appears to be connected to the way I'm working now: I'm using
Xdarwin (basically that's Xfree86 compiled form Mac OS X) to start an
X session on the mac, then I connect to a solaris machine and run IDL
there on remote.
At first I couldn't even use colors, but searching around made me
stumble on
device,decompose=0
Which solves this problem. So now I can use colors, any color table,
in fact. I can modify the color table with xloadct, and I see the
color table changing in the xloadct widget, but these changes do not
affect the already opened graphics window and I have to reload the
images to see the changes (I' ve tried setting retain to 2 but I don't
think this addresses my problem). This is a pain because in my field,
astronomy, I have to do this almost all the time to actually see
what's in the images, and explore the structure of the objects.
I checked on both the Mac and the unix server which types of visual
were supported (with xpdyinfo) and apparently the same types are
supported on both side. Currently I'm set to true_color. Also worth
knowing: my version of IDL is 5.4.
Anyone with ideas on how to solve this problem is welcome.
Marc.
|
|
|
Re: changing the color map without having to re-load an image [message #30039 is a reply to message #29977] |
Thu, 04 April 2002 02:19  |
msauvage
Messages: 2 Registered: April 2002
|
Junior Member |
|
|
Just a few words:
(1) to thank you for the input
(2) Indeed I have checked that in my previous configuration, I was
using 8-bit colors, and not I'm using 24-bit colors.
(3) Indeed XDarwin only supports TrueColor 24-bit visuals. I've tried
modifying that but that's not possible so the DirectColor option is
not one here.
(4) I'm digging into Xcolors, let's see how I can make this work for
me (most of the tools I use to search images are widgets so in
principle thay should be able to "hear" xcolors).
Marc
|
|
|
Re: changing the color map without having to re-load an image [message #30048 is a reply to message #29977] |
Wed, 03 April 2002 17:09  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Stein Vidar Hagfors Haugan (shaugan@esa.nascom.nasa.gov) writes:
> Yes, brave new world and all that. Wonderful progress we've had, when
> you can no longer interactively modify and view the results of color
> table changes without making or using a full-fledged
> application... Sort of takes the I out of IDL, as I've said a few
> times before. But I guess astronomers & fellow tinkerers are not the
> main group of customers - if we had been, a proper system would have
> been worked out (i.e. for any direct graphics window, you can
> associate a certain color table, which you can modify independently of
> the others. They do it in object graphics, but those are not really
> something you'd like to play with from the IDL> prompt directly ;-)
Hell, I routinely write 500+ lines of object graphics
code in the built-in IDL editor:
IDL> .run
IDL> - myplot = Obj_New('IDLgrPlot', data)
IDL> - etc
IDL> END
:^)
> By the way, on my system (1) I *can* do what you want (with some
> pointing and clicking in the display windows after startind xloadct),
> so it is quite platform/visual dependent.
Yes, the DirectColor visual is suppose to give you the
best of both worlds. And I've actually seen it running
correctly....once. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: changing the color map without having to re-load an image [message #30068 is a reply to message #29977] |
Wed, 03 April 2002 07:51  |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
"Marc Sauvage" <msauvage@cea.fr> wrote in message
news:59bc2798.0204030112.6e521c7e@posting.google.com...
< snip >
> I checked on both the Mac and the unix server which types of visual
> were supported (with xpdyinfo) and apparently the same types are
> supported on both side. Currently I'm set to true_color. Also worth
> knowing: my version of IDL is 5.4.
>
> Anyone with ideas on how to solve this problem is welcome.
>
> Marc.
On my Xdarwin (based on XFree 4.2) here, the X server reports only 24-bit
TrueColor (immutable) visuals - no 8-bit visuals. The lack of support for
an
indexed visual or a visual with a writable colormap would
indeed prevent you from doing fast color table animation. It would be nice
if these X servers would support an 8-bit PseudoColor visual - so many X
apps "rely" on that.
If you really do have an 8-bit PseudoColor visual on your server, then
perhaps DEVICE,
PSEUDO_COLOR = 8 (before creating a window) would force IDL to use the 8-bit
visual.
Karl
|
|
|