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

Home » Public Forums » archive » Transparent Image Overlays
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
Transparent Image Overlays [message #81790] Wed, 17 October 2012 07:00
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I have been doing a lot of work lately with LANDSAT images and
I have continually found myself in need of a method of overlaying
two or more images in a semi-transparent way. For example, I have
a number of image masks (water mask, zonal masks, etc, that I would
like to see on top of a LANDSAT image, so I can check for alignments
and so on.

I have written software in the past (e.g., cgBlendImage) that
can blend two images together, but I've found that software
rather clunky to use in practice. To this end, I have made
a number of improvements in cgImage lately that make it
much easier to do this work.

In the past couple of days, I have introduced the following
keywords to cgImage:

TRANSPARENT: Set this keyword to a value between 0 and 100
to add the image to the display window with this percentage
of transparency. Works with 2D or true-color images.

cgImage, cgDemoData(7), CTIndex=0
cgImage, cgDemoData(5), CTIndex=1, TRANSPARENT=50

The POSITION keyword can be used to position the transparent
image on top of the background image.

CTINDEX: Select a color table index to load colors into PALETTE.
REVERSE: Reverse the color vectors selected with CTINDEX.
BREWER: Use CTINDEX to select Brewer color tables.

MAPCOORD: Pass cgImage a map coordinate/projection object
(cgMap) from which it can obtain values for the XRANGE
and YRANGE kewyords.

With these keywords, I can easily overlap map projected images
onto one another, using different color tables and various
amounts of transparency. (Note that to position map projected
images, you must also set the OVERPLOT keyword as well as
passing the map coordinate object to set the axes ranges.)
I work with GeoTiff images a lot, and I use cgGeoMap to
create the map coordinate objects for the images by reading
the GeoTiff image files directly.

I plan an article to discuss some of these new features
shortly. But, you can download a new cgImage program from
here:

http://www.idlcoyote.com/programs/cgimage.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Axis equal
Next Topic: cd to nonexistent directory and up again

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

Current Time: Wed Oct 08 15:22:08 PDT 2025

Total time taken to generate the page: 0.00419 seconds