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

Home » Public Forums » archive » Re: [question] on adding strings when reading file names
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: [question] on adding strings when reading file names [message #36961 is a reply to message #36960] Wed, 12 November 2003 10:09 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Pepijn Kenter" wrote...
> cmin wrote:
>> Hi,
>>
>> I am new to this IDL group.
>> I am trying to read multiple tiff images into my program.
>>
>> It was quite easy using C. But, since I am new to IDL, I am suffering.
> You can use c-style formats in IDL, the syntax is a bit awkward. Try
> something like this:
>
> for i = 1, 10 do begin
> filename=string(format='(%"frame%d.tif")', i)
> print, filename
>
> openr, lun, filename, /get_lun
> ; read stuff
> free_lun, lun ; close the file
> endfor


If you are reading uncompressed TIFF images I suggest using READ_TIFF()
instead of doing it the hard way:

for i = 1, 10 do begin
filename=string(format='(%"frame%d.tif")', i)
print, filename

imageData = READ_TIFF(filename)
endfor

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Goldstein Phase Unwrapper
Next Topic: Differences between IDL's floats and Java's floats - a problem

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

Current Time: Sat Oct 11 04:44:46 PDT 2025

Total time taken to generate the page: 0.65595 seconds