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
Color table question [message #435] Mon, 10 August 1992 15:38 Go to previous message
patel is currently offline  patel
Messages: 9
Registered: August 1992
Junior Member
In PV-WAVW, I need to display a gray scale image(256 grays). I need
few colors for graphics. I did the following to accomplish this:


loadct,0 ; load a gray scale color table.
; Load the color table with 7 colors.
Tvlct, 140, 140, 140, 1
Tvlct, 130, 140, 220, 2
Tvlct, 90, 80, 160, 3
Tvlct, 255, 255, 255, 4
Tvlct, 200, 200, 60, 5
Tvlct, 50, 170, 80, 6
Tvlct, 200, 70, 70, 7

; Byte scale the image in 'im'
imb=bytscl(im)
;to avoid funny colors in the image, set all pixels with value <10 to 10
imb(where(imb lt 10))=10
tvscl,imb
end


with this segment of the program, I donot expect to see any colors
in my image. But I do see scattered pixels with different colors.
What am I doing wrong here.
Thanks for your help.

Maqbool Patel
patel@hippy.drad.umn.edu
[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: Wed Oct 08 17:15:45 PDT 2025

Total time taken to generate the page: 0.00439 seconds