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

Home » Public Forums » archive » Re: invert_ct?
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
Re: invert_ct? [message #4569] Thu, 08 June 1995 00:00
Greening C M is currently offline  Greening C M
Messages: 5
Registered: April 1995
Junior Member
dean@phobos.cira.colostate.edu wrote:
>
> There is h_eq_ct and gamma_ct, but is there a invert_ct to invert the
> color table of a raster image. If not, what would be the simplist way
> to invert the color table of an image with IDL?
>
> Bonus question - what would be the simplist way of inverting the values
> of an image itself?
>
> Kelly Dean
> CSU/CIRA

How about this?

image=255-image
Re: invert_ct? [message #4576 is a reply to message #4569] Wed, 07 June 1995 00:00 Go to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <3r3979$25me@yuma.ACNS.ColoState.EDU>, dean@phobos.cira.colostate.edu writes:
>
> There is h_eq_ct and gamma_ct, but is there a invert_ct to invert the
> color table of a raster image. If not, what would be the simplist way
> to invert the color table of an image with IDL?
>

xloadct() has an "invert_ct" option. Here is the code which does it.

"REVERSE" : BEGIN ;Reverse the table
l = lindgen(ncolors) + cbot
r_orig(cbot) = reverse(r_orig(l))
g_orig(cbot) = reverse(g_orig(l))
b_orig(cbot) = reverse(b_orig(l))
goto, set_gamma ;And redraw
ENDCASE

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: B3 format
Next Topic: Widget convulsions.

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

Current Time: Thu Oct 09 22:28:19 PDT 2025

Total time taken to generate the page: 0.00513 seconds