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

Home » Public Forums » archive » IDL 8 image function
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
IDL 8 image function [message #74789] Wed, 02 February 2011 02:02 Go to next message
sh is currently offline  sh
Messages: 26
Registered: April 2010
Junior Member
Hi,

Is there any option/keyword to turn of the scaling between 0-255? I
have already scaled by values e.g. between 0 and 100 because I only
want to use this colors in the colortable, and not all of them!
Thanks!

Sebastian
Re: IDL 8 image function [message #74821 is a reply to message #74789] Thu, 03 February 2011 08:57 Go to previous message
sh is currently offline  sh
Messages: 26
Registered: April 2010
Junior Member
On Feb 3, 9:28 am, sh <sebastian.h...@gmail.com> wrote:
> On Feb 2, 8:20 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
>
>> On Feb 2, 3:35 pm, sh <sebastian.h...@gmail.com> wrote:
>
>>> Ok this error message comes if RGB_TABLE is not specified within the
>>> image()
>
>>> Now the only problem left is to rescale the colorbar from 0 to 255 to
>>> the dataspace
>
>> I had a feeling I had done this before. As it turns out, I did:
>
>> http://www.ppenteado.net/idl/pp_lib/doc/pp_colorbar_range.ht ml
>
>> It was written back in the days of the iTools, but it seems to work
>> the same with Graphics.
>
> Thanks!! I have already a workaround for this ;)
>
> I create a hidden image with the MY max and min values, and then use
> the colorbar function on this hidden image "overlay".
>
> ov_im=image([[minv,minv],[maxv,maxv]],/HIDE,/OVERPLOT)
> c = COLORBAR(TARGET=ov_im)
>
> It works fine with an RBGA image in the beginning, which I have scaled
> myself with BYTSCL.
> Unfortunately the colorbar uses always 256 colors/values, so when I
> want to use only index from 0 to 100, the rest is black.
> I'm playing around now with the 'IDLgrPalette', maybe I can convince
> IDL to use only the number of colors specified there.

To close this topic:

It is not possible to set bottom or top either for the colorbar or
image. There is actually a putdata setproperty for colorbar but it is
commented....
It would be very useful to let the user choose how many colors should
be used from the colortable. This would allow to specify some colors
as mask or "background" color.

All my images have the first color from the colortable where the NaN's
are! Of course, I can set the alpha channel to 0, but when I save it
as .pdf there are still here. (as .tif it works)

The new graphics seems to be nice on the first sight, but not well-
thought-out. I guess no ITT programer has ever made an image plot,
otherwise there would be at least the possibilty to set a missing data
or background value.

Cheers,
Sebastian
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Writing an efficient array operation in IDL
Next Topic: Envi_get_slice error (subscript range error)

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

Current Time: Wed Oct 08 09:16:19 PDT 2025

Total time taken to generate the page: 0.00567 seconds