FFT2DInverse() -- Inverse 2D FFT

Perform 2D inverse FFT on a potentially large image which may not entirely fit into memory. The algorithm is based on a series of 1D FFT's on the rows and the columns of the image. If necessary, a disk buffer is used to store intermediate transform result.

See Also: FFT2DForward(), Transform2DForward(), Transform2DInverse(), FFTAndFilter(), IMPProgressFunc

CALL SEQUENCE

TBool FFT2DInverse ( nTform, fpIn, dbic, dbiw, fpOut, dboc,
                   dbow, szFILB, bZeroInCenter, 
                   pfnProgress, pProgressArg );
int     nTform;
           Indicates the type of transform image from input.
           Should take either T_FIR (for real and imaginary
           input) or T_FMP (for magnitude and phase input).
FILE    *fpIn;
           File pointer of the input database file.
int     *dbic;
           Array of 2 input channels (for complex data
           input).
int     *dbiw;
           Offset and size of input window. Size should be
           a power of 2 (e.g., 64, 128, 256, 512, 1024 etc.)
FILE    *fpOut;
           File pointer of the output database file.
int     *dboc;
           Array of 1 output channel.
int     *dbow;
           Offset and size of output window. Window size
           should not be larger than input window size.
char    *szFILB;
           Name of a pix file used as a disk buffer. It is
           only used when the entire image does not fit
           into memory. If szFILB is a null string but a
           buffer is needed, a file name is automatically
           generated and saved in szFILB on return.
TBool   bZeroInCenter;
           Indicates whether zero frequency is located in
           the image center. If so, it will be shifted back
           to the upper-left corner before the inverse FFT.
IMPProgressFunc pfnProgress;
       is the pointer to a progress counter function.  See
       IMPProgressFunc for details.
void*   pProgressArg;
       is the callback data argument to the pfnProgress() function.

EXAMPLE

Perform 2D inverse FFT on a 256x256 frequency image. The real and imaginary parts of the image is at the upper-left corner of channel 8 and 9 of database file "irvine.pix". Zero frequency is at the center of image. Output of inverse FFT is to be saved in channel 7 of the database file. Use the name "tmpbuf.pix" for buffer file if needed.

    FILE    *fpIn, *fpOut;
    int     dbic[2], dbiw[4], dboc[1], dbow[4];
    char    szFILB[65];

    fpIn = fpOut = IDBOpen ( "irvine.pix", "r+");
    dbic[0] = 8;
    dbic[1] = 9;
    dbiw[0] = dbiw[1] = 0;
    dbiw[2] = dbiw[3] = 256;
    dboc[0] = 7;
    dbow[0] = dbow[1] = 0;
    dbow[2] = dbow[3] = 256;
    strcpy(szFILB, "tmpbuf.pix");

    FFT2DInverse (T_FIR, fpIn, dbic, dbiw, fpOut, dboc, dbow,
                  szFILB, TRUE, IMPTermProgressCounter, NULL);

About PCI Help Gateway