[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colormaps (a favorite subject!)



David:
Thanks for the code, but my problem is not with grey-levels vs.
number of colormap entries.  My problem is as originally stated
it:  I want the user to be able to select the number of colors
in the colormap, but I can't popup a window to get that information
without having the number of colormap entries already set
in the act of popping up the window.  I must not be explaining
myself very well.  I've done loads of image processing programming
in other languages on Unix and Windoze, so I'm familiar
with colormaps and scaling of image data for display.
I'm working with 16-bit data on 8-bit displays right now and I want to
avoid color-flashing, so I want to use from 32 to 128 colormap
entries for this display program.  I want the user to be
able to select how many entries are used.

Maybe a little more simply:
I have been initializing the size of the colormap used with:
      window,0,colors=numcolors,/pixmap,xsize=10,ysize=10
      wdelete,0
But now I just want to get the number 'numcolors' from the user first.
I think I am realizing that I cannot get that number with a widget.
Right?

Craig

PS: I really appreciate all the time you spend helping us
   IDL novices out....  where do we mail the beer?


>
> Craig is correct in thinking that opening the first IDL
> graphics window establishes the number of colors in that
> IDL session, but I think he is misunderstanding the notion
> of the "number of gray-levels" an image can have. The first
> is a physical limitation (more or less, but I don't really
> want to get into it), the second is a *display* function
> and has nothing to do with anything other than what the
> IDL programmer chooses to do. In practice an image can
> be displayed with *any* number of gray levels, up to and
> including the number of colors or levels available in the
> IDL session.
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155