combine_warp
Purpose:
This program allows .warp files to be combined with affine .air
files so that tranformations that would otherwise require data to be
repeatedly interpolated can be done instead in a single step.
Multiple .warp files cannot be combined with one another and .air
files that include perspective transformations cannot be combined
with .warp files.
Usage:
combine_warp output
overwrite?(y/n)
.air-file1
.warp-file
.air-file3
- where the following definitions apply:
-
-
- output
- the name of the .warp file to be created
- overwrite?(y/n)
- the letter 'y' if you want to allow a preexisting file with
the nameoutput to be overwritten
- .air-file1
- the name of a .air file that has the same standard file as
the .warp file you are trying to create. You can also use
'null' if you want the final .warp file to target the same
standard file as the specified .warp file.
- .warp-file
- the name of the .warp file. It must have a standard file
that is spatially equivalent to the reslice file of .air_file1
and a reslice file that is spatially equivalent to the standard
file of .air_file3
- .air-file3
- the name of a .air file that has the same reslice file as
the .warp file you are trying to create. You can alsouse 'null'
if you want the final .warp file to target the same reslice
file as the specified .warp file.
Examples:
combine_warp A.warpC n B.airC A.warpB null
- If file A.warpC exists,the program will not overwrite it since
overwrite permission has not be granted.
- If file A.warpC does not already exist, it will be created by
combining the other two files. If A.warpB contains parameters for
reslicing file A to match file B and B.airC contains parameters
for reslicing file B to match file C, the resulting file A.warpC
will contain instructions for reslicing file A to match C.
combine_warp A.warpC n null B.warpC A.airB
- If file A.warpC exists,the program will not overwrite it since
overwrite permission has not be granted.
- If file A.warpC does not already exist, it will be created by
combining the other two files. If A.airB contains parameters for
reslicing file A to match file B and B.warpC contains parameters
for reslicing file B to match file C, the resulting file A.warpC
will contain instructions for reslicing file A to match C.
combine_warp A.warpD y C.airD B.warpC A.airB
- File A.warpD will be created by combining the other three
files. If A.airB contains parameters for reslicing file A to match
file B and B.warpC contains parameters for reslicing file B to
match file C and C.airD contains parameters for reslicing file C
to match file D, the resulting file A.warpD will contain
instructions for reslicing file A to match D.
Comments:
- Used correctly, this program provides a powerful mechanism for
aligning images into any arbitrarily chosen space. It can be made
particularly effective if combined with the capabilities of
invert_air ,
combine_air, and
manualreslice.
- Used incorrectly, this program provides a mechanism for
creating total chaos. If any link in the chain of .warp files is
incorrect and escapes the error detection features built into the
program, the resulting .warp file will be nonsense.
- It is absolutely critical that the reslice file in each of the
existing .air or .warp files be spatially equivalent to the
standard file in the .air or .warp file that follows it in the
chain. The program checks for such equivalency directly and also
tests whether one of the pair can be assumed to be equivalent to
the other after interpolation of cubic voxels.
- Unlike combine_air, only three files can be combined, and the
one in the middle must be the .warp file. Multiple .warp files
cannot be combined. Note that by using
combine_air first, you can
effectively create any lengh chain that includes only a single
.warp file.
Error messages: (alphabetical by
case)
See also: Generic error messages
- .air file ____ is perspective, not affine
- perspective .air files cannot be combined with .warp files
- Incompatibility of dimensions ____ and ____
- See discussion in comments
- Incompatibility of voxel sizes ____ and ____
- See discussion in comments
- Name of output .air file cannot contain .img or
.hdr
- This prevents overwriting of image data.
See also:
Modified:
Wed Dec 11, 1996
© 1995-6 Roger P. Woods,
M.D.(rwoods@ucla.edu)