IDL 8 image function [message #74789] |
Wed, 02 February 2011 02:02  |
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  |
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
|
|
|