|
Re: Image function: define new color table [message #84545 is a reply to message #84544] |
Thu, 06 June 2013 08:29  |
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 #84547 is a reply to message #84546] |
Thu, 06 June 2013 08:12  |
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.")
|
|
|