RT 90 - RoTate - image or volume, by 90, 180, or 270 degrees

(05/17/10)

PURPOSE

To rotate an image 90, 180, or 270 about Z axis or rotate a 3-D volume 90, 180, or 270 degrees about either the X, Y, or Z axis. This operation is NOT compatible with any other SPIDER "RT" operations since it does NOT use the standard SPIDER convention for the rotation center used in the other "RT" operations. Instead it does "rotation" by interchanging columns and rows / or slices. This operation may alter handedness of a volume!   Example.

SEE ALSO

ROT [ROTate image/volume around center by specified angle(s)]
RT SF [Rotate and Shift - image, Fourier based spline interpolation ||]
RT SQ [Rotate and Shift - image, Quadratic interpolation ||]

USAGE

.OPERATION: RT 90

.INPUT FILE: IMG000
[Enter the name of the file to be rotated.]

.OUTPUT FILE: OUT000
[Enter the name of the file where the rotated volume is to be kept.]

Following three questions refer to original volume dimensions.

.FIRST AND LAST X COLUMN NUMBER (OR <CR> FOR ALL): <CR>

.FIRST AND LAST Y ROW NUMBER (OR <CR> FOR ALL): 1, 50

.FIRST AND LAST Z SLICE NUMBER (OR <CR> FOR ALL): <CR>

.ROTATION AXIS (X,Y,Z) (<CR> IS Z): X
[Uses a right-handed coordinate system.]

.ROTATION ANGLE (90,180, OR 270): 90
[All rotations are clockwise when looking along axis facing greater values. X axis points to right, Y axis points down screen, and Z axis is coming out of the screen.]

NOTES

  1. The time required will depend on the axis and angle.

  2. Any aspect ratio of image or volume is allowed (the volume does not have to be padded to a cube).

  3. This routine is crudely written, thus it is slow!

SUBROUTINES

REFORM0, REFORM

CALLER

UTIL3