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

Home » Public Forums » archive » Color table question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: color table question [message #29762 is a reply to message #435] Sat, 16 March 2002 12:19 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Rob Dimeo wrote:
>
> Hi,
>
> I suspect that this question will have a very simple answer (hoping,
> anyway).
>
> I want to display an image using color table 6 but this color table
> does not have white in it. Next I want to display a white crosshairs
> on top of the image. The way that I do this is not ideal because I am
> loading the black-white color table after displaying the color image
> in the window but before I draw the crosshairs (see test code below).
> The reason that this is not ideal is that, in my application, I am
> really moving this crosshairs around the screen as the cursor moves
> over the image. Motion events are being generated resulting in many
> calls to loadct, slowing down the whole works.
>
> I guess what I am really asking for is a persistent way to specify the
> color of something as white (for instance) when a particular color
> table has been loaded. I suspect that I can replace one of the color
> table entries with [255,255,255] for instance? I just am not sure how
> to do this.
>
> Any help you can give is greatly appreciated!
>
> Best regards,
>
> Rob

Dear Rob,

we have defined some colortabels in the way that the first 20 colors
are always the same e.g. for plot
The colors from 21 to 255 are used by contour.
With c_color you can set up the colors for the levels.




http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/ct_ncdf.tar.gz
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/ct_blue_green_yellow_red.t

ct_ncdf,c
ct_blue_green_yellow_red

The red_green_blue we don't have but you can design it yourself with
this tool
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/x_def_colortable.tar.gz


regards

Reimar

pro test_color
ct_ncdf,c
ct_blue_green_yellow_red

;loadct,6,/silent
window,xsize = 225,ysize = 225,/free & winVis = !d.window
window,/free,/pixmap,xsize = 225,ysize = 225 & winPix = !d.window
image = smooth(byte(255*randomn(s,225,225,/uniform)),5,/edge_truncat e)
wset,winPix
tv,image
wset,winVis
device,copy = [0,0,!d.x_size,!d.y_size,0,0,winPix]

plots,[0,225],[112,112],linestyle = 0,/device,color=c.white
plots,[112,112],[0,255],linestyle = 0,/device,color=c.white
empty
wdelete,winPix

end

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Any update on OS X
Next Topic: Speedup in Object Graphics

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

Current Time: Sun Nov 30 20:00:57 PST 2025

Total time taken to generate the page: 0.96040 seconds