resize
Purpose:
This program will alter the matrix size of a file (larger or smaller) and/or
shift the file's origin by an integer number of voxels. Voxels in the new
file that were outside the matrix of the input file are set to zero. No
interpolation is required or allowed.
Usage:
resize input new-x-dim
new-y-dim new-z-dim
x-shift y-shift
z-shift output
[overwrite-permission(y/n)]
- where the following definitions apply:
- input
- the name of the input file
- new-x-dim
- the x-dimension of the output file matrix
- new-y-dim
- the y-dimension of the output file matrix
- new-z-dim
- the z-dimension of the output file matrix
- x-shift
- the number of voxels to shift the origin along the x-axis
- y-shift
- the number of voxels to shift the origin along the y-axis
- z-shift
- the number of voxels to shift the origin along the z-axis
- output
- the name of the output file
- overwrite-permission(y/n)
- 'y' will allow a preexisting file named output to be overwritten
Examples:
resize pet1 100 100 10 0 0 0 newpet1 y
- File pet1.img will be resized to matrix dimensions 100 by 100 by 10.
The origin of the new file will be exactly the same as the origin of the
old file.
Comments:
Error messages: (alphabetical by case)
See also: Generic error messages
- file dimensions less than 1 are not allowed
- Try again using positive integers only for new file dimensions
- unable to allocate memory for resized file
- The computer couldn't allocate enough memory to create the new file.
Try asking for a file with smaller dimensions.
See also:
Modified: December 22, 1995
© 1995 Roger P. Woods, M.D.(rwoods@ucla.edu)