head	1.4;
access;
symbols;
locks; strict;
comment	@// @;


1.4
date	95.01.06.05.31.32;	author rjj;	state Exp;
branches;
next	1.3;

1.3
date	94.10.20.05.37.50;	author rjj;	state Exp;
branches;
next	1.2;

1.2
date	94.05.27.01.40.43;	author rjj;	state Exp;
branches;
next	1.1;

1.1
date	94.02.20.04.07.35;	author rjj;	state Exp;
branches;
next	;


desc
@Test file for fft-nd*c.
Since the same header file is used with both verions, the Makefile
actually determines which fft object file is used for linking.
@


1.4
log
@Captialized 'transform'.
@
text
@// test-fft.c           Section: 8.3  Fast Fourier Transform
//      Copyright 1994, Center for Computer Vision and Visualization,
//      University of Florida.  All rights reserved.
// Test the Fast Fourier Transform using spatial transforms
//

#include "FloatDI.h"
#include "IntDI.h"
#include "UcharDI.h"
#include "fft.h"

int main() {
    // Read in the image and covert it to a complex-valued image
    IA_Image<IA_Point<int>,complex>
	x = IA_Image<IA_Point<int>,u_char>::read_PGM(cin);

    x = fft(x);                    // Calculate the FFT
    x = fft_inv(x);                // Reverse effect to see it worked

    // Note: to_uchar() only returns a IA_CoreImage<P,u_char>,
    //       so we have to construct a IA_Image<P,u_char>
    //       before we can invoke the member function.
    IA_Image<IA_Point<int>,u_char>( to_uchar( real_f(x) ) ).write_PGM(cout);

    return 0;
}
@


1.3
log
@Added algorithm name to header.
Added return 0; to test files.
@
text
@d4 1
a4 1
// Test the Fast Fourier transform using spatial transforms
@


1.2
log
@Sanitized IA type names to be v1.0 compliant.
Added/modifed to have standard header.
@
text
@d1 1
a1 1
// test-fft.c            Section: 8.3
a6 2
static char rcsid[] = "$Id: test-fft.c,v 1.1 1994/02/20 04:07:35 rjj Exp rjj $";

d12 1
a12 1
main() {
d24 2
@


1.1
log
@Initial revision
@
text
@d1 4
a4 3
// Emacs: -*- C++ -*-
// test-fft.c
//         Test the Fast Fourier transform using spatial transforms
d7 1
a7 1
static char rcsid[] = "$Id$";
d9 3
a13 1

d15 3
a17 4
    // Read in the image
    IA_IntDiscreteImage e = IA_IntDiscreteImage::read_PGM(cin);

    IA_ComplexDiscreteImage x(e);  // Convert to a complex image
d22 4
a25 1
    IA_UcharDiscreteImage( to_uchar( real_f(x) ) ).write_PGM(cout);
@
