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

Home » Public Forums » archive » Re: Image function: define new color table
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: Image function: define new color table [message #84544] Thu, 06 June 2013 08:34
corinnefrey is currently offline  corinnefrey
Messages: 18
Registered: November 2006
Junior Member
many thanks :)
Re: Image function: define new color table [message #84545 is a reply to message #84544] Thu, 06 June 2013 08:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Corinne writes:

> Great, this works. Any tipps how I can assign the index color programmatically?


LoadCT, 70
TVLCT, 255, 255, 255, 127
TVLCT, palette, /Get

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Image function: define new color table [message #84546 is a reply to message #84545] Thu, 06 June 2013 08:25 Go to previous message
corinnefrey is currently offline  corinnefrey
Messages: 18
Registered: November 2006
Junior Member
Hi David,

Great, this works. Any tipps how I can assign the index color programmatically?

Cheers,
Corinne
Re: Image function: define new color table [message #84547 is a reply to message #84546] Thu, 06 June 2013 08:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Corinne writes:

> I am displaying an image:
>
> im = IMAGE(data, RGB_TABLE = 70, MAX_VALUE = 20, MIN_VALUE = -20)
>
> Now, I want to change the index 127 in RGB_TABLE 70 to white and do this in XPalette. I press the done button.
>
> Then I use
>
> TVLCT, red, green, blue, /GET
>
> and
>
> modifyct, 70, 'Blue and red',red,green,blue, FILE = 'd:\CMF\IDL\colors\colors1.tbl'
>
> to save the modified color table to a file on a different location (I don't have permission to write to the original location).
>
> When I now again display my image, it is not using the modified color table. What can I do, so that image() understands, that I want to use the new color table?

After you load your color table with the modified colors, I would use it
like this.

TVLCT, palette, /Get
im = Image(data, RGB_Table=palette, MAX_VALUE = 20, MIN_VALUE = -20)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Image function: define new color table
Next Topic: Re: A small feature I would love to have for IDL NG

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

Current Time: Thu Oct 09 04:09:22 PDT 2025

Total time taken to generate the page: 2.16043 seconds