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

Home » Public Forums » archive » Re: Questions about IDL 8.0
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Questions about IDL 8.0 [message #73744 is a reply to message #73743] Tue, 23 November 2010 15:45 Go to previous messageGo to previous message
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Make IDL record console output to a file automatically?
Next Topic: Re: high quality 'old' direct graphics

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

Current Time: Thu Oct 09 07:48:22 PDT 2025

Total time taken to generate the page: 0.48466 seconds