Level 2 Help for FFT22

MODE

This parameter specifies the type of transform that is to be performed:

FORWARD specifies that a forward transform is desired, from image space
to transform space.  This is the default if the input format is not 
complex.

INVERSE specifies that an inverse transform is desired, from transform
space to image space.  This is the default if the input format is complex.

Note that it is permissible to specify FORWARD with complex input, but
not to specify INVERSE with non-complex input:  the FFT must always be
in complex format.


FORMAT

Keyword parameter, valid: BYTE, HALF, FULL, REAL, or COMP.

This parameter specifies the format of the data in the output image file
in the case of an inverse transform.  It is ignored in forward transform
mode, because Vicar2 discourages overriding the input label.

Default = BYTE.

Note that the format of the FFT may never be specified, as it is always
COMP (complex).


INP

INP specifies the input picture for a forward transform, or the 
transform dataset for an inverse transform.


OUT

OUT specifies the output transform dataset for a forward transform, 
or the output image for an inverse transform.

The output FFT of an image with NL lines and NS samples will be
of COMPLEX format, with NS lines and NL samples.  I.e., it is 
transposed with respect to the input.  This is done to speed up 
processing.


SIZE

SIZE is a standard VICAR size field:

 (starting line, starting sample, number of lines, number of samples)

This specifies the subimage of the input image to be processed.


SS

Starting sample.  See Help SIZE.


SL

Starting line.  See Help SIZE.


NS

Number of samples.  See Help SIZE.


NL

Number of lines.  See Help SIZE.


SCRATCH

This specifies a disk file that is used by the program to store
data during intermediate steps of the processing.  It is only
required when both of the following conditions are met:
 
   (a) the image buffer required by the program is larger than
      the buffer size specified by the BUFPOW parameter. The image
      buffer size required is N*N complex numbers, where N is the
      smallest power of 2 that equals or exceeds both NL and NS,
      i.e., 8*N*N bytes; and,

   (b) the output file is not large enough to be used for scratch
      storage.  This will be true if its format is not complex, and
      also if the number of lines of the output is less than the
      number of samples.

The default BUFPOW (18) is sufficient to contain a 128*128 image.
However, note that a 64*256 image, say, requires a scratch file,
since it is the larger of NL and NS that determines the buffer size.

The scratch file will be deleted at the end of the execution of "fft22"
by the program.

The default for this parameter is a file in the standard MIPL scratch
directory.  The user may specify a different location for any reason
(e.g., if that disk is full, or not available).  If this parameter is
specified for a case in which it is not required, it is ignored.


BUFPOW

This determines the size of the buffer that the program uses to 
transpose the FFT.  Since this buffer size (in bytes) is always a power
of 2, this parameter specifies the power of 2 which equals the buffer
size:  BUF_SIZE = 2 ** BUFPOW.

Since the FFT will be transposed, this buffer must be able to hold
at least two lines of N complex numbers, where N is the larger of NS
and NL, hence:
                BUF_SIZE >= 2 * 8 * N,
 or:
                               2
                BUFPOW >= 4 + log(N).
The above conditions must be met for the program to run at all.

Furthermore, the entire operation can be done in memory if
BUF_SIZE >= 8*N*N, or BUFPOW >= 3+logN.  This will speed processing,
assuming that the memory is available and that paging is not a
problem.
The user will not in general need to specify this parameter, but it
is provided for the following contingencies:

 (a) to allow improved performance, since increasing the buffer size
    will cut down on the amount of I/O done in the program, but can
    increase paging if a large working set is not available;
 
 (b) to obviate the need for a scratch file (see parameter SCRATCH);