IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2004, 12:36:04 PM (22 years ago)
Author:
desonia
Message:

changed psImageSubset to subset an image without making a deep copy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/image/tst_psImageFFT.c

    r1406 r1606  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-08-06 22:34:06 $
     8 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-08-23 22:36:03 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5858    psLogSetLevel(PS_LOG_INFO);
    5959
    60     if (! runTestSuite(stderr,"psFFT",tests,argc,argv) ) {
    61         psAbort(__FILE__,"One or more tests failed");
    62     }
    63     return 0;
     60    return (! runTestSuite(stderr,"psFFT",tests,argc,argv) );
    6461}
    6562
     
    8481
    8582    // 2. perform a forward transform
    86     img2 = psImageFFT(NULL,img,PS_FFT_FORWARD);
     83    img2 = psImageFFT(img2,img,PS_FFT_FORWARD);
    8784    if (img2->type.type != PS_TYPE_C32) {
    8885        psError(__func__,"FFT didn't produce complex values?");
     
    109106    }
    110107
     108
    111109    // 4. perform a reverse transform
    112     img3 = psImageFFT(NULL,img2,PS_FFT_REVERSE);
     110    img3 = psImageFFT(img3,img2,PS_FFT_REVERSE);
     111
    113112    if (img3->type.type != PS_TYPE_C32) {
    114113        psError(__func__,"FFT didn't produce complex values?");
     
    122121            psF32 pixel = creal(img3Row[col])/m/n;
    123122            if (fabsf(pixel-imgRow[col]) > 0.1) {
    124                 psError(__func__,"Reverse FFT didn't gime original image back (%d,%d %.2f vs %.2f)",
     123                psError(__func__,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
    125124                        col,row,pixel,imgRow[col]);
    126125                return 5;
Note: See TracChangeset for help on using the changeset viewer.