Display of hyperspectral image in the window of a specified size [message #92180] |
Tue, 27 October 2015 03:06  |
Abhinav Gupta
Messages: 1 Registered: October 2015
|
Junior Member |
|
|
Hi all, I am trying to display an image in IDL by using following command,
window, 1, xsize=num_cols, ysize=num_rows, title=fname
tvscl, image[0,*,*]
It works fine, but image is very big, that's why window doesn't fit in the monitor display. Is there a way to customize the window size.
|
|
|
Re: Display of hyperspectral image in the window of a specified size [message #92181 is a reply to message #92180] |
Tue, 27 October 2015 03:30  |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Tuesday, October 27, 2015 at 11:06:45 AM UTC+1, Abhinav Gupta wrote:
> Hi all, I am trying to display an image in IDL by using following command,
>
> window, 1, xsize=num_cols, ysize=num_rows, title=fname
> tvscl, image[0,*,*]
>
> It works fine, but image is very big, that's why window doesn't fit in the monitor display. Is there a way to customize the window size.
Hi,
you have (at least) two options:
1) make your image smaller using either rebin() (integer rescaling factor) or congrid() (any rescaling factor). Something like this:
factor = 2.5
img = congrid(image[0,*,*], num_cols/factor, num_rows/factor)
window, 1, xsize=num_cols/factor, ysize=num_rows/factor, title=fname
tvscl, img
2) use image() (valid for last IDL versions):
factor = 2.5
oImg = image(image[0,*,*], dimensions=[num_cols, num_rows]/factor, title=fname)
Enjoy,
Helder
References:
http://www.exelisvis.com/docs/REBIN.html
http://www.exelisvis.com/docs/CONGRID.html
http://www.exelisvis.com/docs/IMAGE.html
|
|
|