RT SF M - Rotate, Shift & Mirror - image, Fourier based spline interpolation ||

(03/30/12)

PURPOSE

Rotates, scales, and shifts image circularly. (Circularly means image is assumed to be periodic). Rotates counter-clockwise around the center (NX/2 + 1, NY/2 + 1). (Negative angles = clockwise. Output image has SAME size as input image. Order: Scales, rotates, shifts, and mirrors.   Example.

SEE ALSO

RT SF [Rotate and Shift - image, Fourier based spline interpolation ||]
ROT [ROTate image/volume around center by specified angle(s)]
RB 3F [Rotate, Shift, Back Projection in Fourier space |]
SH [Shift - using bilinear/trilinear interpolation ||]
SH F [Shift - using Fourier interpolation ||]
MR [Mirror image or volume]

USAGE

.OPERATION: RT SF M

.INPUT FILE NAME OR TEMPLATE (E.G. STK@****): instack03@
[Enter template for the names of the file(s) to be rotated. This template can alternatively refer to a single image (e.g. img001), or to a series of single images (e.g. img***), to a series of stacked images (e.g stack3@***), or to a whole stack of images ending in '@' (e.g. stk@). Templates containing an asterisk will have the astericks substituted with a number for the file.]

If there is only a single input file specified the following final four prompts appear:

.OUTPUT FILE: rot001
[Enter the name of the file for the rotated and shifted image.]

.ROTATION ANGLE, SCALE, MIRROR (IF < 0): 90, 1, 0
[Enter the rotation angle in degrees, scale factor, and mirror request. Default scale is set to 1.0 (see Note 2). Default is unmirrored]

.SHIFTS IN X & Y: 12.34, -1.98
[Enter the X and Y shift values in pixels.]

Otherwise if the input file name contains astericks for a set of images the following prompts appear:

.FILE NUMBERS OR SELECTION DOC. FILE NAME: select_03
[Enter the file numbers to be substituted into the file name template or name of a selection document file that contains the file numbers in the first register.]

.REG. #'S FOR ANGLE, SCALE, X & Y SHIFT, AND MIRROR (OR * FOR: 6,0,7,8,15): (6,0,7,8,15)
[Enter the register positions in the document file where these parameters are found. If scale register is zero the scale defaults to 1.0. Note that the first two columns in a document file are NOT not called registers so the 3'rd column is the first register. ]

.ANGLE/SCALE DOCUMENT FILE: ANGDOC
[Name of document file that contains angle in degrees, scale factor (>0), X, and Y shifts.

.OUTPUT IMAGE FILE NAME OR TEMPLATE (E.G. STK@****)',
[Enter template for the names of the output image files. The rotated and shifted images are placed in these files. This template can alternatively refer to a series of single images (e.g. img***), or to a series of stacked images (e.g stack3@***), or to a whole stack of images ending in '@' (e.g. stk@). Templates containing an asterisk will have the astericks substituted with a number for the file.]

Otherwise if the input file is a whole stack the following prompts appear:

.REG. #'S FOR ANGLE, SCALE, X & Y SHIFT, AND MIRROR (OR * FOR: 6,0,7,8,15): (6,0,7,8,15)
[Enter the register positions in the document file where these parameters are found. If scale register is zero the scale defaults to 1.0. Note that the first two columns in a document file are NOT not called registers so the 3'rd column is the first register. ]

.ANGLE/SCALE DOCUMENT FILE: ANGDOC
[Name of document file that contains angle in degrees, scale factor (>0), X, and Y shifts.

.OUTPUT IMAGE FILE NAME OR TEMPLATE (E.G. STK@****)',
[Enter template for the names of the output image files. The rotated and shifted images are placed in these files. This template can alternatively refer to a series of single images (e.g. img***), or to a series of stacked images (e.g stack3@***), or to a whole stack of images ending in '@' (e.g. stk@). Templates containing an asterisk will have the astericks substituted with a number for the file.]

Different prompt variations occur for other possible combinations of input and output file stacks.

NOTES

  1. Operation is done using a single interpolation of the input image. Thus, there is no accumulation of interpolation errors.

  2. A change of scale will not change the image dimensions.

  3. The input file may be three-dimensional. In this case, each of the slices is separately rotated and shifted with respect to the z-axis, and stored in the output file, which will be created with the same X, Y & Z dimensions.

  4. Shifts can be any real numbers.

  5. The accuracy of Fourier based bicubic spline (FBS) interpolation is much superior to the quadratic interpolation used in the 'RT SQ' operation.

  6. It is possible for the output image min. & max. intensities to be outside the range of the input image.

  7. Implemented by: G. Kishchenko.

SUBROUTINES

ROTQSS, RTSF, FBS2, GETDOCDAT

CALLER

UTIL3