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

Home » Public Forums » archive » Re: Reading 256x256x16bit 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: Reading 256x256x16bit images [message #6400 is a reply to message #6377] Sun, 16 June 1996 00:00 Go to previous message
jsbenens is currently offline  jsbenens
Messages: 5
Registered: April 1996
Junior Member
Chris Penland <chris@erc-sparc.mc.duke.edu> wrote:
> I have been using the following commands on IDL for PowerMac:
>
> openr, 1, 'silce214.dat'
--->I assume you're correctly typing slice, not silce...
> a=assoc(1,intarr(256,256))
> b=a(1)
>
> then I get an "Encountered end of file" error.

If there's only one image in the file, You should say b=a(0).
Remember, in IDL, an array A of length n has values A(0) thru A(n-1).

> tv, b
>
> then I get something that looks nothing like my image. I have tried
> using a bytarr(256,256) and I don;t run out of file but the
> image looks like it has been checkerboarded and moved around.

Since "b" is an integer array, to use "tv" you should first scale
the values into a byte array using "BYTSCL". For example,
h=bytscl(b)
tv,h

Or use "TVSCL" to do the same thing via:
tvscl, b

If you have multiple images and want them all displayed with the
same scaling, use the keywords "max", "min", and "top" with BYTSCL.

You should probably RTFM on ASSOC, BYTSCL, TV, and TVSCL.

Hope that helps,
-Jeff.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: [Q]IDL: AXIS label alignment
Next Topic: Write to COM port from IDL/Windows?

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

Current Time: Sun Oct 12 08:46:57 PDT 2025

Total time taken to generate the page: 1.27913 seconds