IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2006, 4:43:57 PM (20 years ago)
Author:
drobbin
Message:

Made several changes to image functions/tests w.r.t. subimage v. parent image issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/imageops/tst_psImagePixelExtract.c

    r6484 r6750  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-02-24 23:43:15 $
     8*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-04-01 02:43:57 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2121static psS32 testImageCut(void);
    2222static psS32 testImageRadialCut(void);
     23static psS32 testImageRowColError(void);
    2324static psS32 testImageRowColF32(void);
    2425static psS32 testImageRowColF64(void);
     
    3738                              {testImageSlice, 552, "psImageSlice", 0, false},
    3839                              {testImageCut, 555, "psImageCut", 0, false},
    39                               {testImageRadialCut, 557, "psImageRadialCut", 0, false},
     40                              {testImageRadialCut, 556, "psImageRadialCut", 0, false},
     41                              {testImageRowColError, 557, "testImageRowColError", 0, false},
    4042                              {testImageRowColF32, 558, "psImageRowColF32", 0, false},
    4143                              {testImageRowColF64, 559, "psImageRowColF64", 0, false},
     
    765767}
    766768
    767 psS32 testImageRowColF64(void)
    768 {
    769     psVector *rowcol = NULL;
    770     psVector *empty = NULL;
     769psS32 testImageRowColError(void)
     770{
    771771    psImage *image = NULL;
    772     psImage *emptyImage = NULL;
     772    psVector *out = NULL;
     773    int num = 0;
     774
     775    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     776    out = psImageRow(NULL, image, num);
     777    if (out != NULL) {
     778        return 1;
     779    }
     780
    773781
    774782    image = psImageAlloc(3, 3, PS_TYPE_F64);
    775     rowcol = psVectorAlloc(3, PS_TYPE_F64);
    776 
     783    *(psS32*)&(image->row0) = 5;
     784    *(psS32*)&(image->col0) = 10;
    777785    image->data.F64[0][0] = 666.666;
    778786    image->data.F64[1][0] = 66.6;
     
    785793    image->data.F64[2][2] = 66.66;
    786794
     795
     796
     797    psFree(out);
     798    psFree(image);
     799    return 0;
     800}
     801
     802psS32 testImageRowColF64(void)
     803{
     804    psVector *rowcol = NULL;
     805    psVector *empty = NULL;
     806    psImage *image = NULL;
     807    psImage *emptyImage = NULL;
     808
     809    image = psImageAlloc(3, 3, PS_TYPE_F64);
     810    rowcol = psVectorAlloc(3, PS_TYPE_F64);
     811
     812    image->data.F64[0][0] = 666.666;
     813    image->data.F64[1][0] = 66.6;
     814    image->data.F64[2][0] = 6.66;
     815    image->data.F64[0][1] = 6.6;
     816    image->data.F64[1][1] = 6.666;
     817    image->data.F64[2][1] = 66.666;
     818    image->data.F64[0][2] = 666.6;
     819    image->data.F64[1][2] = 666.66;
     820    image->data.F64[2][2] = 66.66;
     821
    787822    //Test for error with NULL image
    788823    empty = psImageCol(empty, emptyImage, 0);
Note: See TracChangeset for help on using the changeset viewer.