reslice
Purpose:
This is the program that takes .air
files and uses the information that they contain to load the
corresponding image file and generate a
new, realigned file.
Usage:
reslice.air-file
output [options]
- options:
where the following definitions apply:
- .air-file
- name of the input reslice parameter file
- output
- name of the output image file (.hdr or .img suffix
optional)
-
alternate-reslice-file
- name of an alternate reslice file that is spatially
equivalent (same voxel sizes and dimensions) to the default
reslice file specified in the .air-file
- intensity-scale-factor
- multiplicative intensity rescaling factor
- x-dim, y-dim,
z-dim
- output file dimensions
- x-size, y-size,
z-size
- output file voxel sizes
- x-shift, y-shift,
z-shift
- shifts to apply to output file (in voxels)
- model
- one of the following should be selected:
- 0. nearest neighbor
- 1. trilinear
- 2. windowed sinc in original xy plane, linear along z
- 3. windowed sinc in original xz plane. linear along y
- 4. windowed sinc in original yz plane, linear along x
- 5. 3D windowed sinc
- 6. 3D windowed scanline sinc
- 7. 3D unwindowed scanline sinc
- 10. 3D scanline chirp-z
- 11. scanline chirp-z in original xy plane, linear along
z
- x-half-windown width,
y-half-window width, z-half-window-width
- The half-window widths which should only be supplied for
windowed sinc interpolation models. Models 2-4 require two
half-window widths. Models 5 and 6 require three half-window
widths.
- NOTE:
- The program interpolates output to create cubic voxels by
default unless overridden by -k or -p option.
Examples:
reslice pet.air newpet
- if file newpet.img does not already exist, this command will
reslice the reslice file identified in pet.air using the
parameters in pet.air. The resulting file will be interpolated to
cubic voxels (even if the standard file in pet.air did not have
cubic voxels).
reslice pet.air newpet -o
- Same as above example but any existing file newpet.img will be
overwritten.
reslice pet.air newpet -k -o
- Same as above example except that the output file voxels will
have the same dimensions as the standard file (i.e. results will
not be cubic voxels unless the standard file itself had cubic
voxels).
reslice pet.air newpet -o -z 43 2.25
- The reslice file identified in pet.air will be resliced to
generate 43 planes of output data with an interplane distance of
2.25, regardless of the standard file voxel z_size.
Comments:
- Trilinear interpolation is the default interpolation method
for this program.
- Interpolation models 6,7, 10 and 11 use scanline decomposition
to accelerate interpolation. To minimize aliasing, scanline
decomposition is preceeded by oversampling of the data in a
prepass interpolation step. The AIR package is distributed using a
conservative prepass interpolation that doubles the number of
voxels along the necessary dimensions, a strategy that should be
valid even with fairly large rotations (assuming cubic voxels and
a rigid-body spatial transformation model). Prepass interpolation
also increases memory requirements and resampling time, so it can
be advantageous to reduce the amount of prepass interpolation. If
you know that your rotations are always very small, you can adjust
the amount of prepass interpolation in models 10 and 11 by
reducing the values of BIGY and BIGZ in AIR3.0/src/chirpscan.c and
AIR3.0/src/chirperxy.c and recompiling. Any value greater than
1.00 is acceptable. As a rough guide, you should allow for a
prepass interpolation (1/cos2(theta)) where theta is
the largest expected rotation angle (this assumes cubic voxels).
Models 6 and 7 unfortunately cannot be adjusted in this way. The
issue of aliasing in scanline interpolation is complex and has not
been fully addressed for 3D. For a discussion in 2D, see: Fraser,
D, Schowengerdt RA. Avoidance of additional aliasing in multipass
image rotations. IEEE Transactions on Image Processing
1994;3:721-735.
- If you are using the -z option to specify the number of planes
and interplane distance, you may have computed these values to
match your scanner's field of view. If you unexpectedly find that
data for the last plane is always missing, this may be due to
round-off errors. As an exception to the rule otherwise applied in
the AIR package when rounding-off voxel sizes (general rule is
round the smallest voxel size downward and all others upwards),
here you may need to round the interplane distance downwards to
avoid this problem.
- The half window widths for sinc interpolation control the
number of surrounding voxels that contribute to the interpolated
value along each axis of the reslice file. A half-window width of
1 results in interpolation along that axis that only includes the
nearest neighbor on either side and a half-window width of 6 will
include the six nearest neighboring voxels in either direction.
The total number of voxel included for standard 3D sinc
interpolation is therefore
8*(x_half_window_width)*(y_half_window_width*(z_half_window_width).
The larger the half windows,the more closely the interpolation
will match true sinc interpolation, but also the slower the
resampling process.
- Windowing of sinc interpolation is implemented using a Hanning
window function exactly as described by Hajnal JV, Saeed N, Soar
EJ, Oatridge A, Young IR, Bydder GM. Journal of Computer Assisted
Tomography 1995:19:289-296.
Error messages: (alphabetical)
See also: Generic error messages
- File '___' not created because of matrix size
incompatibility...
- The reslice file matrix dimensions don't match those stored
in the .air file.
- Your .air file has gotten associated inappropriately with a
different reslice file.
- The programs scanair, and
identify may help you sort it all
out.
- File '___ not created because of voxel size discrepancy...
- The reslice file voxel sizes don't match those stored in
the .air file
- Your .air file is inappropriately associated with an
incorrect reslice file
- The programs scanair, and
identify may help you sort it all
out.
See also:
Modified: October 25, 1997
© 1995-97 Roger P. Woods,
M.D.(rwoods@ucla.edu)