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



You may want to try PLOTIMAGE, available from my web page.  You can
display a subset of an image using this technique.  The trick is to
set the XRANGE and YRANGE keywords appropriately.  Let's say you have
a 2000 x 200 image, and want to show the subimage from 500 to 1000.
Try this:

plotimage, img, xrange=[500,1000], ...

There are quite a few options to PLOTIMAGE that you might want to
investigate.  For example:

 * you can establish an alternate coordinate system with IMGXRANGE and
 * use the RANGE keyword to scale data for the screen;
 * use the /PRESERVE_ASPECT keyword to force pixels to be square, and
   preserve the aspect ratio of your image.

Have fun!

PLOTIMAGE is self-contained, and can be found here, under Graphics:

"Mark Chan" <chanm@cadvision.com> writes:

> Given:
> 1 cm by 100 cm long continuous color photo (actual size). Saved in an image
> format readable by IDL (e.g. READ_JPEG or equivalent). Cannot reduce in size
> otherwise details will be lost.
> Want:
> Read into IDL. Display only 3 cm strip of the actual photo at any given
> time. Which portion to show depends on some other parameter output from
> another routine.
> Problem:
> 1) Does any one have a similar code to share? If not, any web site that I
> can get some idea on how best to do this? Any suggestion, especially on the
> logic, is greatly appreciated.
> 2) I got a very grainy image when the image is displayed inside IDL. The
> same image is very clear when displayed using a graphical package (e.g.
> PhotoShop or equivalent). This is the first time for me on such topic. I
> must be doing something wrong. Running IDL on WinNT4. Could it be color
> indexing problem? Or resolution problem, etc? Want to improve quality of
> image in IDL. Suggestions?
> Thanks in advance,
> Mark Chan

Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response