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

Home » Public Forums » archive » Importing Binary Images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Importing Binary Images [message #28970 is a reply to message #28873] Fri, 18 January 2002 08:51 Go to previous messageGo to previous message
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
rob schick wrote:

> I'm new to idl, and am trying to import a binary grid that was created
> on a windows machine into idl on a linux machine. It's least
> significant byte first, 1561 rows, 2041 cols.
>
> I searched the archives and found a thread that suggested used the
> following syntax:
>
> IDL> openr, 1, 'gom15dd.dat'
> IDL> ms = bytarr(1561, 2041)
> IDL> readu, 1, ms
> IDL> tv, ms
>
> While this 'works', the image displayed is incorrect - sort of looks
> like speckled white noise. Any thoughts on what I may be doing wrong.
> For a newbie, what's the difference between using readu, and
> read_binary? The online help didn't help. Thanks.

What is the image 'supposed' to look like? It could depend on whether or
not the software that created the image created it in row-major or
column-major order. Try this:

IDL> openr, 1, 'gom15dd.dat'
IDL> ms = bytarr( 2041,1561)
IDL> readu, 1, ms
IDL> ms = transpose(ms)
IDL> tv, ms
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: In case someone has trouble including export.h
Next Topic: Question again :)

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

Current Time: Sat Oct 11 10:46:15 PDT 2025

Total time taken to generate the page: 0.56098 seconds