To import multiple .tiff images into a structure with fields of filename, file size, and user-inputted pixel size, you can use the following code:
main.m519 chars20 lines
This code prompts the user to enter the pixel size, gets the file names in the current directory that end in .tiff, initializes a structure with empty fields, loops through the files and gets the filename and file size, and stores the information in the structure with the user-inputted pixel size.
Note that this code assumes that all of the .tiff files are in the same directory as the script. If the files are in a different directory, you can modify the code to use the cd
and dir
functions to change to the directory and get the file names.
gistlibby LogSnag