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

Home » Public Forums » archive » colour coded shaded relief DEM: go get 'm
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
colour coded shaded relief DEM: go get 'm [message #4759] Tue, 01 August 1995 00:00
Bob Janssen is currently offline  Bob Janssen
Messages: 2
Registered: July 1995
Junior Member
I recently posted a query to this newsgroup concerning colour coded
shaded relief images. With help from Ray Sterner and David Stern, I
produced the following procedure. It's probably not in the least monkey-
proof, so beware). If the thing works, your socks are guaranteed to
be blasted into orbit for awe.

PRO clr_topo, dem

; displays a colour coded shaded relief
; dem is a digital elevation model. US dem's may be
; retrieved from http://sun1.cr.usgs.gov


z=bytscl(dem)
loadct,10
tvscl,z ; rainbow table. Tables more representative for
tvlct,r,g,b,/get ; topography are easily produced. Elevations are
; colour coded.

shades=topo(z) ; produce a monochrome shaded relief image
; topo.pro is available from Ray Sterner's
; anonymous ftp site at fermi.jhuapl.edu

; decompose the colour image into the red, green and blue channels
; and convert to hue, saturation, value sets.

rr=r(z>1) & gg=g(z>1) & bb=b(z>1)
color_convert,rr,gg,bb,hh,ss,vv,/rgb_hsv

; now, replace the value channel "vv" by "shades". This trick is
; commonly used in satellite image processing. The value channel of
; a colour satellite image contains the information that we
; perceive as topography. In our particular case,
; this information resides in "shades", the shaded relief image.

color_convert,hh,ss,shades,r1,g1,b1,/hsv_rgb

; The topographic relief information is inserted into the colour
; coded elevation image. Finally, the image is converted back to
; the rgb colour system.

c=color_quan(r1,g1,b1,r2,g2,b2,colors=256,/dither) ;for 8 bit screens
tvlct,r2,g2,b2 & tv,c ; et voila le travail !

;loadct,0 & erase
;tv,rr,channel=1
;tv,gg,channel=2
;tv,bb,channel=3 ;for 24 bit screens

END

Yours,

Bob Janssen
Institut de Physique du Globe
5, rue Rene Descartes
67084 Strasbourg Cedex
France.
bob@klakmuf.u-strasbg.fr
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Compound widget problem
Next Topic: Re: PV-WAVE for PC

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

Current Time: Wed Oct 08 19:22:52 PDT 2025

Total time taken to generate the page: 0.00481 seconds