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

Home » Public Forums » archive » Re: Binary images with these formates: *.cor, *.unw, *.hgt
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
Re: Binary images with these formates: *.cor, *.unw, *.hgt [message #78068] Tue, 25 October 2011 04:32
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Sun, 23 Oct 2011 03:47:59 -0700 (PDT), Dave Poreh
<d.poreh@gmail.com> wrote:

> Folks
> hi,
> i am doing some analysis with a software and for visualization i need
> to open some binary images with these formates: *.cor, *.unw, *.hgt.
> does any body have any idea to how to read these images?
> thanks for any help.
> Cheers,
> Dave

According to this description
http://pages.uoregon.edu/das/WikiRoiPac/doku.php?id=output
these are raw images with BIL format (Band Interleaved by Line)

The BIL structure is not to difficult:
http://vterrain.org/Imagery/formats.html

However these files also have "ROI_PAC File Structure = rmg". Does
this mean there are two bands (amplitude and phase)? Not sure. Anyway,
this is a start:

; Parameters
bigendian=0b ; assumed little endian
path='...'
ncol=... ; you should know
nband=2 ; assume two bands (amplitude and phase)

; Read data block
openr,lun,path,/get_lun, SWAP_IF_BIG_ENDIAN=~bigendian,$
SWAP_IF_LITTLE_ENDIAN=bigendian
n=(fstat(lun)).size/32 ; number of floating point numbers
m=n/ncol ; number of rows * number of bands
data=fltarr(ncol,m)
readu,lun,data
free_lun,lun

; Extract amplitude and phase
data=reform(data,ncol,nband,m/nband,/overwrite)
amplitude=reform(data[*,0,*])
phase=reform(data[*,1,*])
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: REGION_GROW Syntax
Next Topic: Re: Fourier back to real space

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

Current Time: Wed Oct 08 17:48:03 PDT 2025

Total time taken to generate the page: 0.00463 seconds