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

Home » Public Forums » archive » Re: loading colors in tvscl
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: loading colors in tvscl [message #54550] Tue, 26 June 2007 14:43
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kostis writes:

> Yes im in DirectColor...

Ah... :-)

> It looks easy to fix
> but i dont understand which is this IDL start-up file
> and where do i find it..

You create it with a text editor.

If you don't want to use it, or you have difficulty
pointing your IDL_STARTUP environment variable at it
after you create it, just be sure that you
type this command in your IDL session BEFORE you
open a graphics window of any kind:

IDL> Device, TRUE_COLOR=24

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.")
Re: loading colors in tvscl [message #54552 is a reply to message #54550] Tue, 26 June 2007 14:02 Go to previous message
kostis is currently offline  kostis
Messages: 17
Registered: December 2006
Junior Member
Yes im in DirectColor...
It looks easy to fix
but i dont understand which is this IDL start-up file
and where do i find it..
I know its a stupid question but could anyone tell me???

Thanx!
Re: loading colors in tvscl [message #54555 is a reply to message #54552] Tue, 26 June 2007 13:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kostis writes:

> I tried the following but still no color....
> If i wasnt permitted to do that i should see a message right?
>
> LoadCT, 5, NColors=100, Bottom=100
> for i=1,100 do begin
> image=congrid(bytscl(ARRAY[*,*,i]),500,500)
> TVSCALE,ROTATE(image,1), NColors=100, Bottom=100
> endfor
>
> LoadCT, 33
> for i=1,100 do begin
> image=congrid(bytscl(ARRAY[*,*,i]),500,500)
> TVIMAGE,ROTATE(image,1)
> endfor

Well, then. You have bigger problems than I thought. :-)

My guess is that you are on a LINUX computer that is
using a DirectColor visual. You can see if this is so,
by typing this:

IDL> Device, Get_Visual_Name=theVisual & Print, theVisual

If you see DirectColor printed out, read this article
IMMEDIATELY:

http://www.dfanning.com/misc_tips/idlsetup.html

As long as you are in DirectColor, *nothing* will make sense to
you. :-)

If this is not the case, send us the result of this command:

IDL> Help, /Device

And we will see what to do next.

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.")
Re: loading colors in tvscl [message #54556 is a reply to message #54555] Tue, 26 June 2007 12:43 Go to previous message
kostis is currently offline  kostis
Messages: 17
Registered: December 2006
Junior Member
On Jun 26, 8:42 pm, David Fanning <n...@dfanning.com> wrote:
> kostis writes:
>> I cant manage to display an array with tvscl using a color table taken
>> by XLoadCT
>> The table is loaded normally but i dont see any colors
>> What's wrong with my routine?
>> Any suggestions on this??
>
>> LoadCT, 33
>> for i=1,100 do begin
>> image=congrid(bytscl(ARRAY[*,*,i]),500,500)
>> tvscl,ROTATE(image,1)
>> endfor
>
> You might want to consider a routine like TVScale or
> TVImage that is a little smarter at figuring out
> what color decomposition model you want to be using:
>
> http://www.dfanning.com/programs/tvscale.pro
> http://www.dfanning.com/programs/tvimage.pro
>
> 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.")


I tried the following but still no color....
If i wasnt permitted to do that i should see a message right?

LoadCT, 5, NColors=100, Bottom=100
for i=1,100 do begin
image=congrid(bytscl(ARRAY[*,*,i]),500,500)
TVSCALE,ROTATE(image,1), NColors=100, Bottom=100
endfor

LoadCT, 33
for i=1,100 do begin
image=congrid(bytscl(ARRAY[*,*,i]),500,500)
TVIMAGE,ROTATE(image,1)
endfor
Re: loading colors in tvscl [message #54559 is a reply to message #54556] Tue, 26 June 2007 10:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kostis writes:

> I cant manage to display an array with tvscl using a color table taken
> by XLoadCT
> The table is loaded normally but i dont see any colors
> What's wrong with my routine?
> Any suggestions on this??
>
> LoadCT, 33
> for i=1,100 do begin
> image=congrid(bytscl(ARRAY[*,*,i]),500,500)
> tvscl,ROTATE(image,1)
> endfor

You might want to consider a routine like TVScale or
TVImage that is a little smarter at figuring out
what color decomposition model you want to be using:

http://www.dfanning.com/programs/tvscale.pro
http://www.dfanning.com/programs/tvimage.pro

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.")
Re: loading colors in tvscl [message #54560 is a reply to message #54559] Tue, 26 June 2007 10:14 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Jun 26, 12:34 pm, kostis <kostis...@gmail.com> wrote:
> I cant manage to display an array with tvscl using a color table taken
> by XLoadCT
> The table is loaded normally but i dont see any colors
> What's wrong with my routine?
> Any suggestions on this??

Could be that your display is decomposed:

N = 100
img = dist(N,N)
window, xsize=2*N, ysize=N
device, get_decomposed=decomposed
print, decomposed
device, decomposed=0
tvscl, img, 0
device, decomposed=1
tvscl, img, 1

Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: error using statement: If.....then
Next Topic: Re: error using statement: If.....then

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

Current Time: Wed Oct 08 18:13:47 PDT 2025

Total time taken to generate the page: 0.00667 seconds