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 #29003 is a reply to message #28873] Thu, 24 January 2002 07:56 Go to previous message
rschick is currently offline  rschick
Messages: 2
Registered: January 2002
Junior Member
rschick@neaq.org (rob schick) wrote in message news:<240cd6d2.0201180638.46419bb3@posting.google.com>...
> 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.

Ok - thanks to all for the replies. The program creating the image, is
in row-major. I created the image on an NT machine, and am using IDL
on a linux machine (intel processor).

I tried
IDL> openr, 1, 'gom15dd.dat', /swap_if_little_endian
IDL> ms = intarr(2041,1561)
IDL> readu, 1, ms
IDL> tvscl, ms

and this looks better. I don't think it's quite correct, so my
questions as related to the suggestions are:

If my image is indeed not byte, do I do something different, e.g.
-rw-r--r-- 1 robs robs 12744004 Jan 17 14:38 gom15dd.dat
that value divided by (1561x2041) = 4 ?

Do I do anything differently to account for the row-major output?
(specifying columns first in the openr line made the image appear more
normal...

Thanks, Rob
[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: Fri Oct 10 15:48:15 PDT 2025

Total time taken to generate the page: 1.44038 seconds