Configuring AIR 5.x Manually in the AIR.h file

Please note: This page provides details on configuring AIR 5.x by modifying the AIR.h file. This was the default method for configuring earlier versions of AIR, but is no longer the preferred method. If you have some compelling reason to configure via the AIR.h file, you should set the AIR_CONFIG_CONFIG variable to 0 to assure that the other values are not overridden by data in config.h. If AIR_CONFIG_CONFIG is non-zero, the defaults in the AIR.h file may be overridden by any values that are configured in config.h ( when AIR_CONFIG_CONFIG is 1) or config_PC.h (when AIR_CONFIG_CONFIG is 2)

Many options can be configured by modifying the AIR.h header file that is located in the subdirectory AIR/src/. This file can be modified using the text editor of your choice. You should be very careful not to change any punctuation in the file since this may confuse the C compiler when it tries to read the modified file. It is a good idea to save a backup copy before making modifications. Only the lines shown in green can be edited by changing the assigned value (a number or a sequence of characters enclosed by double quotes) at the end of the line. Other lines shown in black must be left intact--changing them can have unexpected consequences or make it impossible to compile AIR.

The following lines in AIR.h can be configured with site specific information:

This number determines how AIR will look for configuration information:
  1. If this value is 0, AIR will not consult with config.h or config_PC.h files looking for configuration information. Use this option if automatic configuration fails and you are not compiling for the PC under DOS, Windows or Windows NT
  2. If this value is 1, AIR will preferentially use data from the configure.h file over values listed in AIR.h. If automatic configuration fails, you will not be able to use this option (unless you create an empty file called config.h)
  3. If you are compiling for the PC under DOS, Windows or Windows NT, you should set this value to 2 and provide any configuration information in config_PC.h. Note also that you must modify AIRmain.h and HEADERmain.h in the main AIR directory.
This number determines the separators used in path names. The options are:
  1. Unix style paths (including MacOS X) where '/' is used as the path separator
  2. PC sytle paths where '\' is used as the path separator
Note that Macintosh OS 9 (and lower) is no longer supported, so no allowances are made for colons as path separators. Mac OS X is fully supported as a UNIX platform.
If non-zero, AIR will attempt to detect image files (.hdr and .img), .air file, .warp files and .vector files that need to be byte swapped because they were generated on a different machine. If your machine does not conform to the IEEE Standard for Binary Floating Point Arithmetic (ISO/IEEE Std 754-1985), you should set this value to zero because conformance with this standard is assumed when byte swapping. For the same reason, only data generated by machines that conform to this standard can be properly byte swapped for use by AIR.
The only supported values are 8 and 16. If you choose 8, data will be represented internally and saved as 8 bits/pixel. If you choose 16, data will be represented internally and saved as 16 bits/pixel. (Either way, you will be able to read in 8 or 16 bit data, this variable only controls output data). If you are not sure what to do here, the issue of 8 and 16 bit data is discussed elsewhere at length.
#define AIR_CONFIG_REP16 3
This variable is irrelevant if you have OUTBITS set to 8. The acceptable values are 1, 2 and 3. The variable controls the format of 16 bit data saved to disk by the AIR package. If you are not sure what to do here, the issue of 16 bit data types is discussed elsewhere at length.
AIR_CONFIG_THRESHOLD1 and AIR_CONFIG_THRESHOLD2 control the default pixel value thresholds used by the registration programs. If you have set AIR_CONFIG_OUTBITS to 8, only the first set of thresholds is used. If you have set AIR_CONFIG_OUTBITS to 16, only the second set is used. The thresholds should be values that will typically separate brain (suprathreshold) from nonbrain (subthreshold). The values used in the AIR distribution are not particularly likely to be useful in your laboratory. Look at some data to make a reasonable guess, and bear in mind that these thresholds are easily overridden on a per use basis.
If non-zero, this allows some non-essential information to be printed to the screen when AIR programs are run
The variable decides how fussy the AIR package is about deciding that pixel sizes are identical. If you plan to round off pixel sizes only to the nearest .1 mm (not recommended), you need to make this value .1. If you like to type everything out to 15 decimal places, you can make the AIR package equally compulsive.
This controls the inclusion of a non-ANSI subroutine that checks for a user's membership in secondary groups when testing whether file reading or writing is expected to succeed. A non-zero value should only be used on platforms that support membership in multiple groups and that support the non-ANSI C subroutine getgroups(). Compilation of src/fprobr.c and src/fprobw.c will fail if getgroups() is not supported and this configuration variable is non-zero.
This controls whether AIR uses two C functions that are not part of the ANSI C standard, but that provide useful functionality if available. The non-ANSI functions stat() and lstat() make it possible to access UNIX file permissions. By using these functions, AIR can inform a user of specific reasons that a program failed (e.g., that the user lack write permission in the directory where data is supposed to be saved). Some non-UNIX C compilers also implement stat() and/or lstat() (even though the underlying operating system may not support all of the informative functionality). If stat() and/or lstat() are available, it is recommended that you use them. However, if they are not available, compilation will probably fail unless you set this value to 0. Possible configuration values are:
This controls whether AIR will use a non-ANSI C function needed for safe on-the-fly decompression of image files. If non-zero, AIR will use the function popen() to pipe data from a decompression program into AIR. If your compiler does not support popen, you should set this value to zero. If this value is zero, you do not need to worry about AIR_CONFIG_DECOMPRESS, AIR_CONFIG_COMPRESSED_SUFFIX or AIR_CONFIG_DECOMPRESS_COMMAND because they have no effect in the absence of popen().
This parameter is only relevant if AIR_CONFIG_PIPES is non-zero. If this value is set to zero, code to decompress images on-the-fly is disabled.
This parameter is only relevant if AIR_CONFIG_PIPES and AIR_CONFIG_DECOMPRESS are both non-zero. This suffix identifies compressed header or image files. For example, if the value is ".gz", files ending with .hdr.gz will be recognized by AIR as compressed header files and files ending with .img.gz will be recognized as compressed image files. If you use the UNIX compress routine, you would need to change the suffix to ".Z".
This parameter is only relevant if AIR_CONFIG_PIPES and AIR_CONFIG_DECOMPRESS are both non-zero. This must identify a command that is able to decompress files ending with AIR_CONFIG_COMPRESSED_SUFFIX when followed by a file name ending in this suffix. In addition, the command must output to a pipe.
If the decompression program is not on a user's search path, AIR may fail to find the command. In this case, you can give a fully qualified path for the decompression program (e.g., "/usr/local/bin/gunzip -c ").
Note that a trailing space after the command is required.
Don't change this! The user configurable location for AIR_CONFIG_DECOMPRESS is above

Modified: July 21, 2002

© 2001-2002 Roger P. Woods, M.D.(