invert_ct? [message #4578] |
Wed, 07 June 1995 00:00 |
dean
Messages: 55 Registered: March 1993
|
Member |
|
|
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
|
|
|
Re: invert_ct? [message #4579 is a reply to message #4578] |
Wed, 07 June 1995 00:00  |
sjt
Messages: 72 Registered: November 1993
|
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
Unless I seriously misunderstand what you are trying to do, it seems trivial:
tvlct,r,g,b,/get
tvlct, not r, not g, not b
Similarly for a byte image, (not image) will do a bitwise inversion. For
other types the action is the same but results are not quite as obvious
because other types are signed.
--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+----------------------------------------------------------- --+---------+
|
|
|
Re: invert_ct? [message #4580 is a reply to message #4578] |
Wed, 07 June 1995 00:00  |
knipp
Messages: 68 Registered: January 1993
|
Member |
|
|
In article 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?
>
> Bonus question - what would be the simplist way of inverting the values
> of an image itself?
>
> Kelly Dean
> CSU/CIRA
Assuming 8-Bit images (8 Bits Per Pixel, grey values range 0 ... 255) try
invert_grey = 255b - original_grey
------------------------------------------------------------ ------------
Karlheinz Knipp
knipp@ipi.uni-hannover.de
------------------------------------------------------------ ------------
|
|
|