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

Home » Public Forums » archive » Processing about 10,000 tif files
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: Processing about 10,000 tif files [message #90977 is a reply to message #90976] Tue, 19 May 2015 15:03 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Tuesday, May 19, 2015 at 11:07:39 PM UTC+2, livingw...@gmail.com wrote:
> Dear Gurus,
>
> I have RGB images in tif format and want to do simple arithmetic calculations.
> A big obstacle to me is number of files to be processed, about 10,000 images.
> Name of the image files has sequential id such as img_1.tif, img_2.tif, ....., img_10000.tif.
> And I have a text file containing image names, coefficients, and offsets.
> I think reading the text file as an array with three columns and lines matching number of files seems to be successful.
>
> I've tried to read image files with dialog_pickfile, but I've learned that the function limits byte length and can't seem to go beyond more than 2,000 files or so.
> And I've tried to read image files with file_search, but it didn't do calculation in sequential order.
>
> Would you give some suggestion how to read image files in order, so that following calculation should be in order from 1 to 10,000?
> Or a way to do calculation with image name corresponding lines in the text file?
>
> Thanks in advance,
> Kim

I've been there before and I see two ways out of this:
1) construct the file array with something like 'img_'+strtrim(indgen(10000)+1,2)+'.tif'
2) use file_search and then sort the file array to have the order you wish
3) read the text file sequentially and process sequentially

Option 2) is not easy because the files don't have a format like img_00001.tif, otherwise sorting would be easier.

Hope it helps.
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D point cloud visualization
Next Topic: Stretch color image with colorbar compatible issue

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

Current Time: Wed Oct 08 18:05:06 PDT 2025

Total time taken to generate the page: 0.00449 seconds