loading colors in tvscl - Idl-pvwave

This is a discussion on loading colors in tvscl - Idl-pvwave ; 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 ...

+ Reply to Thread
Results 1 to 7 of 7

loading colors in tvscl

  1. Default loading colors in tvscl

    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

    Thanx


  2. Default Re: loading colors in tvscl

    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


  3. Default Re: loading colors in tvscl

    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.")

  4. Default Re: loading colors in tvscl

    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





  5. Default Re: loading colors in tvscl

    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.")

  6. Default Re: loading colors in tvscl

    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!






  7. Default Re: loading colors in tvscl

    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.")

+ Reply to Thread

Similar Threads

  1. Read Envi File under IDL and Display within TVSCL
    By Application Development in forum Idl-pvwave
    Replies: 1
    Last Post: 11-07-2007, 01:37 PM
  2. Size of image using tvscl?
    By Application Development in forum Idl-pvwave
    Replies: 2
    Last Post: 07-11-2007, 03:03 PM
  3. loading image -> detect when image is done loading
    By Application Development in forum Javascript
    Replies: 0
    Last Post: 05-10-2007, 02:29 PM
  4. Determining a "best fit" set of colors from a larger set of colors
    By Application Development in forum Graphics
    Replies: 4
    Last Post: 10-25-2006, 08:46 AM
  5. Re: Converting spot colors to web colors
    By Application Development in forum Adobe Color Management
    Replies: 0
    Last Post: 10-13-2006, 05:00 PM