Program by Jonathan Greenberg
Property of the CSTARS Lab at the University of California, Davis.
Please ask for permission before distributing this script.
Introduction:
This is an ENVI script to convert the number type of an image file. Certain programs (ACORN, for instance) require an image to be in a specific numerical format (byte, integer, etc), but there is no quick and easy way to do this in ENVI. This is a quick script that reads an image which has been loaded into the available bands in ENVI, and converts it to whatever numerical format you need.
System Requirements:
This should work on UNIX, Macintosh and Windows with ENVI 3.4 or later. I haven't
tested it with older versions of ENVI.
Instructions:
1. Unzip the file with your favorite decompressor-- Unix users use "unzip [filename]", Macintosh users can use Stuffit Expander and Windows users have a myriad of decompressors (usually WinZip is the unzipper of choice).
2. Place the convert_image_number.pro in your ENVI save_add directory. Do a find file or ask your sysadmin if you can't find it. If ENVI is running it will need to be restarted before you can use the script.
3. In the ENVI command line (go to Windows-> Command Input if you can't
see it), type:
convert_image_number,'output_filename',output_data_type
Note for ACORN users: use datatype #2 to convert it to the proper value, and then use ENVI's Basic Tools: Convert Data (BSQ, BIL, BIP) to convert the resultant file to BIP or BIL format. ACORN doesn't support BSQ, which is the format the integer file will be in once you run the script.
Change Log:
1.0: Original release.
The software on this page has been created by CSTARS members, and may be freely downloaded by outside users. However, if you wish to distribute or use the source code of these applications, please ask permission from the author(s) first. The author, CSTARS and the University of California take no responsibility for any damage this software may create.