HOME GUIDE OPERATIONS DOCS ERRORS FORMATS INSTALL NEW TIPS WEB SITES

SH - SHift - using bilinear interpolation

(09/03/96)

PURPOSE

Shifts a picture or a volume by a specified vector.

SEE ALSO

SH F [Shift using Fourier interpolation]

USAGE

.OPERATION: SH

.INPUT FILE: PIC001
[Enter the name of the picture to be shifted.]

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

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

[In the above example, PIC001 will then be shifted by -5.2 units in the x direction and 6.5 units in the y direction, and the result will be written into SHI001.]

If input is 3D, the system asks an additional question:

.SHIFT COMPONENT IN Z: 2.2

NOTES

  1. The shift parameters can be specified by reference to the temporary register: -X11,-X12, will input the components (with inverted sign) of a shift vector found in a previous 'CC' and 'PK X11,X12' operation. Whether or not the sign has to be inverted follows from the order of argument files in the 'CC' operation.

  2. The action of the operation depends on the shift specified. For integer shift vector components a simple index permutation is done. For non-integer shift values, bilinear interpolation is used.

  3. DNEW (K,I) = DOLD (K',I')
    where K' = K + KSH, I' = I + ISH
    This operation shifts into sample positions only. Note that the shift is circular, i.e., the image is repeated in all directions. The effective new coordinate pair is:
    K' = MOD (K + KSH, NSAM)
    I' = MOD (I + ISH, NROW)
    Because of the use of the circular shift, SH has the effect of multiplying the Fourier transform with:
    exp (2 [pi] j (KSH * KX/NSAM + ISH * KY/NROW))

  4. The shift operation has the unpleasant effect of moving a discontinuity into the image field (this happens whether or not the shift is circular). If this is not desired, and cannot be removed by subsequent masking, the image should be recreated from its original field by rewindowing. The new window coordinates must be offset by -KSH,-ISH to correspond to an application of 'SH' with +KSH,+ISH.

SUBROUTINES

SHIFT2, SHIFT1, SHIFT_PF, SHIFT3, SHIFTT, SHIFT_3D

CALLER

UTIL2

© Copyright Notice /       Enquiries: spider@wadsworth.org