X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 17 May 2010 12:37 AM by  anon
Batch resampling
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
17 May 2010 12:37 AM
    Hi I am very new to IDL and am still trying to get my head around it :-) I need to do a batch resolution resample of a number of Tiff  images to a 1:16 ratio. I am not sure how to set this resampling ratio. Can anyone help? Thanks Chenay    

    Deleted User



    New Member


    Posts:
    New Member


    --
    18 May 2010 02:38 PM
    What you can do is use the READ_TIFF() function to read the image into an array, and then use CONGRID() to resample the image.  For example:   img = read_tiff(filename) newimg = congrid(img, 3, newxdim, newydim) write_tiff, newfilename, newimg   You could do this in a FOR loop for multiple files as well.  For example you could use the FILE_SEARCH() function to retrieve the paths to all of your tiff files and then loop through those, reading, resampling, and rewriting each file. -JE ITTVIS Tech Support
    You are not authorized to post a reply.