Configuring AIR 3.08
Several aspects of AIR 3.08 can be configured before compilation
to make the package more usefult at your site. Most options are
configured by modifying the AIR.h header file that is located in the
subdirectory AIR3.08/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.
The following lines in AIR.h can be configured with site specific
information:
- #define PLATF 3
- This governs the selection of machine dependent constants. If
possible, use a value of 3 which directs the compiler to look for
these values in the compiler's include file "float.h", thereby
assuring correct values. If your compiler complains about not
having a float.h file, you will have to choose between values of 1
and 2:
- 1 Big-endian machines
- Sparcstations
- Macintoshes
- 2 Little-endian machines
- 3 Preferred choice for all machines with compilers
that include the C header file "float.h"
- #define RADIX 2
- This configuration option was added in AIR version 3.02. Most
machines have a radix of 2. IBM mainframes use 16, and some
machines use a radix of 10. After AIR has compiled, you can
usually verify that you have selected the correct radix by running
the program sizeof.
- #define PATHS 3
- This determines what kind of separators are used in path
names. Unix machines use forward slashes (e.g., AIR3.06/src), PC's
use backslashes (e.g.,AIR3.06\src) and Macintoshes use colons
(e.g.:AIR3.06:src). Pick the one appropriate for your platform:
- 1 Unix
- 2 PC's
- 3 Macintosh
- Note: If you change this variable, you must
also make the appropriate changes to the files AIRmain.h,
AIRnlmain.h, and HEADERmain.h in the main AIR directory.
Otherwise, the compiler will be unable to locate this header file
when compiling the programs that reside in the main AIR directory.
- #define RADIX 2
- This configuration option was added in AIR version 3.02. Most
machines have a radix of 2. IBM mainframes use 16, and some
machines use a radix of 10. After AIR has compiled, you can
usually verify that you have selected the correct radix by running
the program sizeof.
- #define MAC_CW 0
- If this is nonzero, special code is added to emulate a command
line interface when compiling for the Macintosh using CodeWarrior.
Do not use this option if you are compiling for other platforms or
if you are not using CodeWarrior.
- #define PIX_SIZE_ERR .0001
- 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, you need to make this value
.1. If you like to type everything out to many decimal places, you
can make the AIR package equally compulsive.
- #define PIXEL_MAX_SIZE 10
- The AIR package will warn you if you load a file with pixels
bigger than 10 mm (on the assumption that this is an error). If
you regularly use huge pixels, make this number really big.
- #define PIXEL_MIN_SIZE .1
- The AIR package will warn you if you load a file with pixels
smaller than .1 mm (on the assumption that this is an error). If
you regularly use tiny pixels, make this number really small.
- #define OLD_ANALYZE 0
- ANALYZE 2.0 (a very old version) will sometimes change all the
pixel sizes to 1.0 when you save a file. If you use ANALYZE 2.0,
change this value to 1 and you will be warned whenever a file
claiming to have voxel sizes of exactly 1.0 x 1.0 x 1.0 is loaded.
If you don't use ANALYZE 2.0, leave this as 0 to avoid getting
unnecessary warnings.
- #define COMPRESS 1
- If this value is 1, AIR will automatically attempt to
decompress an image file if the uncompressed version is not
available. This is accomplished using the UNIX uncompress command.
The data is subsequently recompressed using the UNIX compress
command. If compression/decompression is causing problems with
compilation (e.g., if you aren't on a UNIX machine) set this to 0
to deactivate this feature.
- #define CLOCK 0
- The program alignlinear, when run in verbose mode (using the
command line -v option) will time each iteration as it performs
alignment if this variable is set to 1. This feature is highly
non-portable, and I would leave it as 0 unless you are using a Sun
compiler.
- #define OUTBITS 8
- 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 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.
- #if(OUTBITS==8)
#define THRESHOLD1 55
#define THRESHOLD2 55
#elif(OUTBITS==16)
#define THRESHOLD1 7000
#define THRESHOLD2 7000
#endif
- THRESHOLD1
and THRESHOLD2
control the default pixel value thresholds used by the
registration programs. If you have set OUTBITS to 8, only the
first set of thresholds is used. If you have set OUTBITS to 16,
only the second set is used. The thresholds should be values that
will typically separate brain (suprathreshold) from nonbrain
(subthreshold). For 8 bit PET data, thresholds of 55 work well for
me, but for MRI a threshold of 10 is usually more appropriate. For
16 bit data, it's a tough call--maybe around 7000 for PET, but MRI
could be anywhere from 100 to 1000 or beyond. Look at some data to
make a reasonable guess, and bear in mind that these thresholds
are easily overridden on a per use basis.
Modified: February 19, 1998
© 1996-98 Roger P. Woods,
M.D.(rwoods@ucla.edu)