reorient
Purpose:
Rotates image files (.img files)
90 or 180 degrees and/or mirrors them along the major axes and
updates their header files (.hdr
files) appropriately. This allows gross prealignment of images so
that automated registration has a reasonable chance of success.
This program can also be used to convert files to the data type (e.g.
8-bit or 16-bit) specified as the
preferred output data type when the AIR
package was compiled
Usage:
reorientinput
output [options]
- options:
- [o] overwrite permission granted
- [x] mirror along x axis
- [y] mirror along y axis
- [z] mirror along z axis
- [xy] rotate +90 degrees to interchange x and y
axes
- [yx] rotate -90 degrees to interchange y and x
axes
- [xz] rotate +90 degrees to interchange x and z
axes
- [zx] rotate -90 degrees to interchange z and x
axes
- [yz] rotate +90 degrees to interchange y and z
axes
- [zy] rotate -90 degrees to interchange z and y
axes
- [xx] rotate 180 degrees around x axis
- [yy] rotate 180 degrees around y axis
- [zz] rotate 180 degrees around z axis
- where the following definitions apply:
- input
- name of the input image file (.hdr or .img suffix optional)
- output
- name of the output image file (.hdr or .img suffix
optional)
- NOTE:
- This program is unusual in that it does not require (or allow)
minus signs before the optional arguments.
Examples:
reorient pet.img pet.img o xx yz z
- This will load the file pet.img, rotate it 180 degrees around
the x axis, rotate it 90 degrees to interchange the y and z axes,
mirror it along the z axis and then overwrite the input files
pet.img and pet.hdr with the result.
reorient 16bitmri 8bitmri o
- If the AIR package is compiled to generate 8-bit output files,
a 16-bit input file will be remapped
as an 8-bit image when it is
imported. Likewise, if the
AIR package is compiled to generate 16-bit output files of a given
type, 8-bit and other types of 16-bit input files will be remapped
as they are imported and
exported from the AIR
package. If the AIR package is compiled to generate 8-bit images,
the remapping of 16-bit imported voxel values is governed by the
header global maximum which can
be altered using setheadermax.
Comments:
- There are 48 different ways a file can ultimately be oriented,
and half of these are 3D mirror images of the other half. Many
combinations of operations will generate the same results. Unless
you have already worked it out with other files from the same
source, you will probably want to use some guided trial and error
combined with image display to sort out how the files should be
oriented. Be careful that you don't end up with a file that is a
mirror image of the file that you are trying to register to. Don't
assume that there are any conventions for the 3D representation of
images from different sources. Don't forget that reversing the
order of the planes in a data set converts it to its 3D mirror
image.
Error messages: (alphabetical)
See also: Generic error messages
- unable to allocate memory...
- insufficient RAM is available to create the reoriented
image
- try later when more RAM might be available
- use scanheader on the
original image to make sure the matrix dimensions are correct
See also:
Modified: December 11, 1996
© 1995-96 Roger P. Woods,
M.D.(rwoods@ucla.edu)