manualreslice
Purpose:
This is the only interactive program in the AIR package and it
serves four roles. Given values for rigid
body transformation parameters (x_shift,y_shift, z_shift,roll,
pitch and yaw) with or without 3 scaling parameters, it can:
- Convert these values into an
initialization file for use with
an AIR alignment program (example 1).
- Use these values to reslice a file to generate a new file with
specified voxel dimensions and matrix size
(example 2)
- Create a .air file based on
these values that can be used by other programs such as
reslice,
combine_air,
combine_warp and
invert_air (example
2).
- Generate a .air
file that will interpolate a
specified image file to cubic voxels based on the same
top alignment assumptions utilized by the
programs zoomer and
reslice (example
3).
Usage:
manualreslice
- NOTE:
- Supply information and answer the questions at the prompts
-
Shifts are defined in units of cubified reslice file voxels. In
other words, if the file that you are planning to reslice has
anisotropic voxel sizes, you must envision the file as having been
interpolated to cubic voxels when specifying shifts. For example,
if your voxels are anisotropic with a larger z size than x and y
size, a z-axis shift of 1 will shift you a distance equivalent to
the x and y axis pixel size, not by 1 plane as you might otherwise
expect).
Examples:
Example 1:
manualreslice
x-axis shift in voxels:0
y-axis shift in voxels:0
z-axis shift in voxels:0
roll (rotation around y-axis in degrees:0
pitch (rotation around x-axis in degrees:10
yaw (rotation around z-axis in degrees:0
x scale-down factor:1
y scale-down factor:1
z scale-down factor:1
Save parameters as initialization file for automated registration? (y/n):y
Name of initialization file to save:myfile.init
Parameters saved to initialization file myfile.init
Exit?(y/n):y
- This usage will save an initialization file called myfile.init
specifying initialization with 10 degrees of pitch
Example 2:
manualreslice
x-axis shift in voxels:0
y-axis shift in voxels:0
z-axis shift in voxels:0
roll (rotation around y-axis in degrees:0
pitch (rotation around x-axis in degrees:10
yaw (rotation around z-axis in degrees:0
x scale-down factor:1
y scale-down factor:1
z scale-down factor:1
Save parameters as initialization file for automated registration? (y/n):n
[path/]name of file to reslice (no spaces allowed):pet1.img
Define target space by {e}xample file or {m}anually? (e/m):e
[path/]name of example file (no spaces allowed):pet2.img
Save a .air file based on the information provided? (y/n):y
Full name of .air file:pet1.airpet2
.air file saved as pet1.airpet2
Exit? (will proceed to reslice file if answer is no) (y/n):n
Output voxel dimensions will be 2 x 2 x 6
Would you prefer cubic voxels (2 x 2 x 2)? (y/n):n
[path/]name of output file (no spaces allowed):newpet1
Resliced file newpet1.img has been saved
- This usage will create a .air
file that can be used in the future with the program
reslice to reslice file pet1 with 10
degrees of pitch. Reslicing based upon the .air file pet1.airpet2
will generate a file that has the same matrix and voxel dimensions
as file pet2.
- The matrix and voxel dimensions could have been specified
manually by responding with 'm' instead of 'e' to the prompt about
the target space.
- Because of the negative response to the last exit query, file
pet1 was resliced to generate file newpet1 which has the same
dimensions and matrix size as pet2. 10 degrees of pitch was
applied in the course of reslicing.
- The option of interpolating file newpet1 to cubic voxels was
offered but declined.
Example 3:
manualreslice
x-axis shift in voxels:0
y-axis shift in voxels:0
z-axis shift in voxels:0
roll (rotation around y-axis in degrees:0
pitch (rotation around x-axis in degrees:10
yaw (rotation around z-axis in degrees:0
x scale-down factor:1
y scale-down factor:1
z scale-down factor:1
Save parameters as initialization file for automated registration? (y/n):n
[path/]name of file to reslice (no spaces allowed):pet1
Define target space by {e}xample file or {m}anually? (e/m):m
The file you want to reslice has voxels with
x-dimension size of 1.745000e+00
y-dimension size of 1.745000e+00
z-dimension size of 6.750000e+00
What sizes do you want for voxels after reslicing?
x-dimension size:1.745
y-dimension size:1.745
z_dimension size:1.745
The file you want to reslice has matrix dimensions of
x-dimension 128
y-dimension 128
z-dimension 15
What dimensions do you want for matrix after reslicing?
x_dimension:128
y_dimension:128
z_dimension:55
Save a .air file based on the information provided? (y/n):y
Full name of .air file:pet1.airinterpolate
The two spaces that you have defined meet criteria suggesting that
you may view them as identical except for interpolation error.
Do you want to treat them as spatially identical? (y/n):y
Parameters adjusted from center-center alignment to
first_plane-first_plane alignment
Reslicing will reflect spatial identity
.air file saved as pet1.airinterpolate
Exit? (will proceed to reslice file if answer is no)
(y/n):y
- This usage illustrates a special case handler in the program
that allows you to create a .air file that will mimic the
interpolation behavior of
zoomer. By indicating that the files are
spatially identical, the .air file that is created will reflect
top-to-top alignment rather than center-to-center alignment that
is otherwise the default for manualreslice.
- The option to treat files as spatially identical is only
offered when the values of pitch, roll, yaw, x-shift, y-shift, and
z-shift are all zero and all scale_down factors are 1. In
addition, the dimensions of the target space must be equal to the
interpolated dimensions of the
reslice space based upon the top-to-top interpolation model, and
the smallest voxel size in each of the two files must be
identical.
- The -f option
in zoomer provides a much easier way to generate the
same .air file that this program will generate here.
Comments:
- Initialization files can be
viewed and modified with a text editor. Do not be alarmed that the
values are different from those that you typed in--the units and
the order in which parameters are listed have been changed to meet
the requirements of an initialization file. If the scale-down
factors that you provide are all equal to 1, the program assumes
that you want to generate a six parameter rigid body
initialization file. If any of the scale-down factors is not
exactly 1, a 3D nine parameter model initialization is provided.
- Rotations are defined to take
place around the exact center of the files.
- Translations are defined in
units of cubified reslice file voxels, so if your reslice file has
anisotropic voxel sizes, you should envision the file as being
interpolated to cubic voxels when specifying shifts.
- The order
in which you enter the various parameters is conceptually the
order in which the parameters are applied to the reslice file to
resample it into the standard file space. This should make it
possible to maintain a mental image of what the program is doing.
Note that
translations take place in the reslice file space, not in the
final image (standard file) space. Rescaling
takes place in the final image space. Note that when the AIR
package actually performs reslicing, it must find the data in the
reslice file that corresponds to each voxel in the output file, so
the order in which shifts, rotations and
rescalings are actually applied by the resamplng program must
be reversed from the conceptual order used here.
- The ability to create a .air
file manually will allow you to resample data to any voxel
size and matrix dimensions that you like. By using
combine_air you can combine the
resizing with any other registration that needs to be performed to
minimize reinterpolation of your data.
Error messages: (alphabetical)
See also: Generic error
messages
Other error messages generated by this program are self
explanatory
See also:
Modified: December 18, 2001
©1995-2001 Roger P. Woods,
M.D.(rwoods@ucla.edu)