|
Re: working with colours [message #37648 is a reply to message #37647] |
Tue, 13 January 2004 08:14  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
maarten" <user@domain.invalid> wrote in message
news:4003EF71.5070201@domain.invalid...
> I have a problem with working with colours. I have two datasets that
> will be layed on eachother. One of the datasets will be displayed in
> greyvalues, the other will have to be displayed in a blue-red activation
> colourscheme, transparancy isn't needed. I tried to divide the
> colourspace in two separate parts using the bytscl command. But then all
> the colours of my linux environment are changed. Is there a way to avoid
> this, and also to be able apply the colourscheme to just one window,
> leaving the other windows in greyscale?
Download my IMDISP program from
http://www.gumley.com/PIP/Free_Software.html
and try this:
;- Gray scale image
window, /free
loadct, 0, bottom=0, ncolors=64
imdisp, dist(256), bottom=0, ncolors=64
;- Blue/red image
window, /free
loadct, 11, bottom=64, ncolors=64
imdisp, dist(256), bottom=64, ncolors=64
If the colors don't turn out as expected, then exit IDL, and save the
following commands in a file named $HOME/idl_startup.pro:
if !version.os_family eq 'unix' then device, true_color=24
window, /free, /pixmap, colors=-10
wdelete, !d.window
device, decomposed=0, retain=2, set_character_size=[10, 12]
device, get_visual_depth=depth
print, 'Display depth: ', strcompress(depth)
print, 'Color table size: ', strcompress(!d.table_size)
Use this file as your IDL startup file by setting the IDL_STARTUP
environment variable, and start a new IDL session, e.g.
% setenv IDL_STARTUP $HOME/idl_startup.pro
% idl
Now try the image display commands again.
Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
|
|
|
Re: working with colours [message #37651 is a reply to message #37648] |
Tue, 13 January 2004 07:05  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
maarten writes:
> I checked the number of colors in IDL, but this is only 256. is it
> possible to make this number higher and would this solve the problem?
Yes, make the number 16.7 million. :-)
Cheers,
David
P.S. What kind of graphics card does this machine have?
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
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: working with colours [message #37652 is a reply to message #37651] |
Tue, 13 January 2004 06:49  |
maarten
Messages: 30 Registered: April 2002
|
Member |
|
|
Pepijn Kenter wrote:
>
>
> maarten wrote:
>
>> Hello,
>>
>> I have a problem with working with colours. I have two datasets that
>> will be layed on eachother. One of the datasets will be displayed in
>> greyvalues, the other will have to be displayed in a blue-red
>> activation colourscheme, transparancy isn't needed. I tried to divide
>> the colourspace in two separate parts using the bytscl command.
>
>
> It's possible that I misunderstand your problem or that you allready
> thought of the following solution, but it seems to me that you can map
> the first parameter to the Value, and the second parameter to the Hue in
> the HSV (or HSL) color coordinate system. You can use the color_convert
> routine from IDL to convert this HSV color to an RGB value, and then
> display the result as normal.
>
> HTH, Pepijn.
>
I checked the number of colors in IDL, but this is only 256. is it
possible to make this number higher and would this solve the problem?
regards maarten
|
|
|
Re: working with colours [message #37653 is a reply to message #37652] |
Tue, 13 January 2004 06:29  |
Pepijn Kenter
Messages: 31 Registered: April 2002
|
Member |
|
|
maarten wrote:
> Hello,
>
> I have a problem with working with colours. I have two datasets that
> will be layed on eachother. One of the datasets will be displayed in
> greyvalues, the other will have to be displayed in a blue-red activation
> colourscheme, transparancy isn't needed. I tried to divide the
> colourspace in two separate parts using the bytscl command.
It's possible that I misunderstand your problem or that you allready
thought of the following solution, but it seems to me that you can map
the first parameter to the Value, and the second parameter to the Hue in
the HSV (or HSL) color coordinate system. You can use the color_convert
routine from IDL to convert this HSV color to an RGB value, and then
display the result as normal.
HTH, Pepijn.
|
|
|
Re: working with colours [message #37655 is a reply to message #37653] |
Tue, 13 January 2004 05:57  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
maarten writes:
> I have a problem with working with colours. I have two datasets that
> will be layed on eachother. One of the datasets will be displayed in
> greyvalues, the other will have to be displayed in a blue-red activation
> colourscheme, transparancy isn't needed. I tried to divide the
> colourspace in two separate parts using the bytscl command. But then all
> the colours of my linux environment are changed. Is there a way to avoid
> this, and also to be able apply the colourscheme to just one window,
> leaving the other windows in greyscale?
I think what you are talking about is 24-bit color.
It may be time for a graphics card update on your machine. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
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
|
|
|