Re: Questions about IDL 8.0 [message #73744 is a reply to message #73743] |
Tue, 23 November 2010 15:45   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paulo Penteado writes:
> This works for me
>
> IDL> rt0=rebin(reform(bindgen(256),1,256),3,256) ;make up a table
> IDL> rt1=rebin(reform(reverse(bindgen(256)),1,256),3,256) ;make up
> another table
> IDL> im=image(dist(100),rgb_table=rt0) ;make an image with table rt0
> IDL> im.rgb_table=rt1 ;switch the table to rt1
Can someone explain this example for me:
;*********************************************************** *********
file = Filepath('worldelv.dat', SUBDIRECTORY = ['examples', 'data'])
world = Read_Binary(file, DATA_DIMS = [360,360])
CTLoad, 4, /BREWER, RGB_TABLE=ct
img = Image(world, RGB_TABLE=ct)
CTLoad, 18, /BREWER RGB_TABLE=nct
img.rgb_table=nct ; to new color table
Help, ct, nct
END
;*********************************************************** *********
IDL> .go
% IDLITDATAIDLPALETTE::SETDATA: Data must be a 3xN or 4xN array.
CT BYTE = Array[256, 3]
NCT BYTE = Array[256, 3]
I can load the first color table fine, but not the second,
even though they are formatted in EXACTLY the same way. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|