Re: Questions about IDL 8.0 [message #73741 is a reply to message #73740] |
Tue, 23 November 2010 16:12   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Nov 23, 9:52 pm, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> ;*********************************************************** *********
>> 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
>> ;*********************************************************** *********
>
> Oh, wait, there is a typo there! I need a comma
> after the second BREWER.
>
> CTLoad, 18, /BREWER, RGB_TABLE=nct
>
> But even when fixed, it doesn't work. :-(
If your question is why it works with the first table, and not the
second, I do not have an answer. I would not expect it to work with
either, because 3 is the second dimension.
I verified that both work when I use the transpose of what ctload
returns.
I would guess that the init method looks for the dimension with length
3, while the setproperty method just assumes it is the first.
|
|
|