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

Home » Public Forums » archive » Display of hyperspectral image in the window of a specified size
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
Display of hyperspectral image in the window of a specified size [message #92180] Tue, 27 October 2015 03:06 Go to next message
Abhinav Gupta is currently offline  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 Go to previous message
Helder Marchetto is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: MATRIX LOGARITHM (and EXPONENTIAL)
Next Topic: Memory management when concatenating arrays

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

Current Time: Wed Oct 08 09:21:37 PDT 2025

Total time taken to generate the page: 0.00388 seconds