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 
Switch to threaded view of this topic Create a new topic Submit Reply
color table question [message #29773] Thu, 14 March 2002 10:14
robert.dimeo is currently offline  robert.dimeo
Messages: 42
Registered: November 2001
Member
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

--
Robert M. Dimeo, Ph.D.
NIST Center for Neutron Research
National Institute of Standards and Technology
100 Bureau Drive - Stop 8562
Gaithersburg, MD 20899-8562

Telephone: (301) 975-8135
FAX: (301) 921-9847

www.ncnr.nist.gov/staff/dimeo
www.ncnr.nist.gov/instruments/hfbs


------------------------
pro test_color
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]
loadct,0,/silent
plots,[0,225],[112,112],linestyle = 0,/device
plots,[112,112],[0,255],linestyle = 0,/device
empty
wdelete,winPix
return
end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: sismology with IDL
Next Topic: Double Accuracy

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

Current Time: Wed Oct 08 13:47:36 PDT 2025

Total time taken to generate the page: 0.00574 seconds