softmean


Purpose:

This program will average together a series of files. Any zero valued voxels are treated as missing data and the output exclude zero input values when computing the output value. This is the recommended program for creating mean files to be used as inputs to automated registration since a non-zero value in any of the input files assures a non-zero value in the output. If you have no missing data in your field of view (i.e., all zeros truely represent a real world value of zero), you should use mean instead of this program. The program strictmean will give an output value of zero if any input at that voxel is zero and is the program of choice when any missing data is unacceptable (e.g., when creating masks for global normalization). These latter two programs are not included as part of the AIR 2.0 general release.


Usage:

softmean output overwrite?(y/n) scaling-suffix input-file1 [...input-fileN]
where the following definitions apply:

output
the name of the output file
overwrite?(y/n)
type 'y' if you want to overwrite any preexisting file with the same name as output
scaling-suffix
the suffix of the files that store the scaling factors. Each input file should have a scaling factor file associated with it. These files should contain a single ASCII number that represents a multiplicative factor for converting voxel values into real world values (i.e., its units should be real world units/voxel unit). All scaling files must have the same units (we use the real world value that corresponds to the maximum representable value in the input file).

An equivalent scaling file will be created for your output file and will have the same units as your input rescaling files.

If all of your input files are scaled identically, you can use "null" as the scaling suffix and a value of 1.0 will be automatically assigned to all input files. Note that the output may still be rescaled. Since no output file scaling file can be created (no suffix available), the scaling factor will be printed out on the screen.
input-file1
the name of the first input file
...input-fileN
the names of any additional input files
NOTE:
If you want to use a * wildcard on a UNIX based system to specify the input file names, you should include either the .img or the .hdr suffix (e.g., pet*.hdr) but not both. If you just end with the wildcard (e.g., pet*), each file will be loaded twice (once as .hdr and once as .img). There is no harm in doing this except that it will take twice as long to get an answer.

Examples:

softmean pet_mean y .max pet1 pet2 pet3 pet4 pet5 pet6

Comments:


Error messages: (alphabetical by case)

See also: Generic error messages
Coding error when calling meancalc(), weighted means should not use strictness of zero
Values have been rescaled by a factor of ____
WARNING: File ____ rescaled during loading by multiplicative factor of ____
WARNING: Files being averaged have different numbers of bits/pixel
WARNING: Values as high as ____ were encountered but were set to ____
file ____ is not compatible with file ____

See also:


Modified: December 22, 1995

© 1995 Roger P. Woods, M.D.(rwoods@ucla.edu)