SH F - Shift - using Fourier interpolation ||

(09/18/14)

PURPOSE

Shifts an image/volume series using Fourier interpolation. Warning Fourier shift does not preserve intensity range.   Example.

SEE ALSO

SH [Shift - using bilinear/trilinear interpolation ||]
RT SF [Rotate and Shift - image, Fourier based spline interpolation ||]
RT SQ [Rotate and Shift - image, Quadratic interpolation ||]

USAGE

.OPERATION: SH F

.INPUT FILE NAME OR TEMPLATE (E.G. STK@****): PIC001
[Enter the name of the file to be shifted. This name can be for a single file, a whole stack (ending in @), or a template for a set of images (e.g stack3@****** or fil***). Templates containing asterisks will have the astericks substituted with a number for the file.]

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

.OUTPUT FILE: SHI001
[Enter the name of the file where the shifted image is to be placed. ]

.SHIFT COMPONENTS IN X, Y, & Z: -5.2, 6.5
[Enter the shift vector components.]

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 input file numbers in the first register.]

.OUTPUT FILE NAME OR TEMPLATE (E.G. IMGSTK@****):
[Enter template for the names of the output file(s).]

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

.SHIFT DOCUMENT FILE: savdocstksh
[Name of document file containing the shifts.]

.REG. #'S FOR X & Y SHIFTS (OR * FOR: 2,3): 2, 3
[Enter the register column positions in the document file where these parameters are retrieved from.]

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


.OUTPUT STACK FILE: STACK03@
[Enter the name of the file where the centerd images are to be placed. This output file will be a whole stack. Image numbers within the stack will correspond to the input stack]

.SHIFT DOCUMENT FILE: savdocstksh
[Name of document file containing the shifts.]

.REG. #'S FOR X & Y SHIFTS (OR * FOR: 2,3): 2, 3
[Enter the register column positions in the document file where these parameters are retrieved from.]

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

NOTES

  1. The amplitude spectrum is invariant to translation, but the phase spectrum depends on shift. For shifting of an image or volume a signal is converted to reciprocal space, multiplied by complex transformation coefficient,and then reconverted to the real space. This technique has the best accuracy of interpolation of shifted object among another interpolation methods. It's 100% reversible if you shift object and then shift it back with the same shift step it returns image or volume identical to originals.

  2. For shifting an image the 2D Fourier transform of image is multiplied by
    exp (2 [pi] j (Xsh * Kx/NX + Ysh * Ky/NY))
    where: Xsh is shift along X-axis, and Ysh is shift along Y-axis.

  3. For shifting a volume the 3D Fourier transform of image is multiplied by
    exp (2 [pi] j (Xsh * Kx/NX + Ysh * Ky/NY + Zsh * Kz/NZ))
    where: Xsh is shift along X-axis, Ysh is shift along Y-axis, and Zsh is shift along Z-axis.

  4. The sign of the shift depends on how the shift values were determined. For example if 'CC' and 'PK' are used to determine the shift, the signs depend on the order of argument files in the 'CC' operation.

  5. Note that the shift is periodic, i.e., the image is repeated in all directions. This means that when an area of an image is shifted outside the original image boundary it reappears on the opposite boundary

SUBROUTINES

SHIFTS, SHIFT_PF, FMRS_2, FMRS_3, FMRS

CALLER

UTIL_1110