IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1929


Ignore:
Timestamp:
Sep 29, 2004, 10:17:58 AM (22 years ago)
Author:
desonia
Message:

changes associated with the testing of psImageSubsection.

Location:
trunk/psLib
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/psLib.kdevses

    r1897 r1929  
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    4  <DocsAndViews NumberOfDocuments="7" >
    5   <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageExtraction.c" >
    6    <View0 line="723" Type="???" >
    7     <AdditionalSettings Top="1" Width="1123" Attach="1" Height="738" Left="1" MinMaxMode="0" />
     4 <DocsAndViews NumberOfDocuments="6" >
     5  <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageExtraction.h" >
     6   <View0 line="0" Type="???" >
     7    <AdditionalSettings Top="1" Width="1138" Attach="1" Height="702" Left="1" MinMaxMode="0" />
    88   </View0>
    99  </Doc0>
    10   <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageErrors.dat" >
    11    <View0 line="27" Type="???" >
    12     <AdditionalSettings Top="1" Width="1123" Attach="1" Height="736" Left="1" MinMaxMode="0" />
     10  <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageExtraction.c" >
     11   <View0 line="151" Type="???" >
     12    <AdditionalSettings Top="1" Width="1530" Attach="1" Height="998" Left="1" MinMaxMode="0" />
    1313   </View0>
    1414  </Doc1>
    15   <Doc2 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageExtraction.h" >
    16    <View0 line="146" Type="???" >
    17     <AdditionalSettings Top="1" Width="1123" Attach="1" Height="738" Left="1" MinMaxMode="0" />
     15  <Doc2 NumberOfViews="1" URL="file:/home/desonia/psLib/test/image/tst_psImageExtraction.c" >
     16   <View0 line="523" Type="???" >
     17    <AdditionalSettings Top="1" Width="1138" Attach="1" Height="675" Left="1" MinMaxMode="0" />
    1818   </View0>
    1919  </Doc2>
    20   <Doc3 context="" NumberOfViews="1" URL="man:/hypot" >
    21    <View0 Type="???" >
    22     <AdditionalSettings Top="1" Width="1123" Attach="1" Height="736" Left="1" MinMaxMode="0" />
     20  <Doc3 NumberOfViews="1" URL="file:/home/desonia/psLib/test/image/tst_psImageManip.c" >
     21   <View0 line="45" Type="???" >
     22    <AdditionalSettings Top="1" Width="1138" Attach="1" Height="675" Left="1" MinMaxMode="0" />
    2323   </View0>
    2424  </Doc3>
    25   <Doc4 context="" NumberOfViews="1" URL="man:/usr/share/man/man3/hypot.3.gz" >
    26    <View0 Type="???" >
    27     <AdditionalSettings Top="1" Width="1123" Attach="1" Height="736" Left="1" MinMaxMode="0" />
     25  <Doc4 NumberOfViews="1" URL="file:/home/desonia/psLib/test/image/tst_psImage.c" >
     26   <View0 line="23" Type="???" >
     27    <AdditionalSettings Top="1" Width="1138" Attach="1" Height="675" Left="1" MinMaxMode="0" />
    2828   </View0>
    2929  </Doc4>
    30   <Doc5 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImage.c" >
    31    <View0 line="482" Type="???" >
    32     <AdditionalSettings Top="1" Width="1123" Attach="1" Height="738" Left="1" MinMaxMode="0" />
     30  <Doc5 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageErrors.dat" >
     31   <View0 line="15" Type="???" >
     32    <AdditionalSettings Top="1" Width="1532" Attach="1" Height="991" Left="1" MinMaxMode="0" />
    3333   </View0>
    3434  </Doc5>
    35   <Doc6 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImage.h" >
    36    <View0 line="177" Type="???" >
    37     <AdditionalSettings Top="1" Width="1123" Attach="1" Height="738" Left="1" MinMaxMode="0" />
    38    </View0>
    39   </Doc6>
    4035 </DocsAndViews>
    4136 <pluginList>
  • trunk/psLib/src/image/psImageErrors.dat

    r1918 r1929  
    1414psImage_INTERPOLATE_METHOD_INVALID     Specified interpolation method (%d) is not supported.
    1515psImage_SUBSET_RANGE_INVALID           Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d].
     16psImage_SUBSET_RANGE_MALFORMED         Specified subset range, [%d:%d,%d:%d], is invalid.  Ranges must be incremental.
    1617psImage_SUBSECTION_NULL                Specified subsection string can not be NULL.
    1718psImage_SUBSECTION_INVALID             Specified subsection string, '%s', can not be parsed.  Must be in the form '[x1:x2,y1:y2]'.
  • trunk/psLib/src/image/psImageErrors.h

    r1918 r1929  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-09-28 02:27:58 $
     9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-09-29 20:17:58 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636#define PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID "Specified interpolation method (%d) is not supported."
    3737#define PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID "Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."
     38#define PS_ERRORTEXT_psImage_SUBSET_RANGE_MALFORMED "Specified subset range, [%d:%d,%d:%d], is invalid.  Ranges must be incremental."
    3839#define PS_ERRORTEXT_psImage_SUBSECTION_NULL "Specified subsection string can not be NULL."
    3940#define PS_ERRORTEXT_psImage_SUBSECTION_INVALID "Specified subsection string, '%s', can not be parsed.  Must be in the form '[x1:x2,y1:y2]'."
  • trunk/psLib/src/image/psImageExtraction.c

    r1924 r1929  
    99 *  @author Robert DeSonia, MHPCC
    1010 *
    11  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-29 01:10:27 $
     11 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-29 20:17:58 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6565                   PS_ERR_BAD_PARAMETER_VALUE, true,
    6666                   PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,
    67                    col0, col1, row0, row1,
    68                    image->numCols, image->numRows);
     67                   col0, col1-1, row0, row1-1,
     68                   image->numCols-1, image->numRows-1);
    6969        return NULL;
    7070    }
     
    166166        return NULL;
    167167    }
    168     return imageSubset(NULL,image,col0,row0,col1,row1);
     168
     169    if (col0 > col1 || row0 > row1) {
     170        psErrorMsg(PS_ERRORNAME_DOMAIN "psImageSubsection",
     171                   PS_ERR_BAD_PARAMETER_VALUE, true,
     172                   PS_ERRORTEXT_psImage_SUBSET_RANGE_MALFORMED,
     173                   col0,col1,row0,row1);
     174        return NULL;
     175    }
     176
     177    return imageSubset(NULL,image,col0,row0,col1+1,row1+1);
    169178}
    170179
  • trunk/psLib/test/image/tst_psImage.c

    r1920 r1929  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-09-28 23:26:49 $
     8 *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-09-29 20:17:58 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222
    2323static int testImageAlloc(void);
    24 static int testImageSubset(void);
    2524static int testImageCopy(void);
    2625
     
    2827                              {testImageAlloc,546,"psImageAlloc",0,false},
    2928                              {testImageAlloc,548,"psImageFree",0,true},
    30                               {testImageSubset,547,"psImageSubset",0,false},
    31                               {testImageSubset,550,"psImageSubset",0,true},
    3229                              {testImageCopy,551,"psImageCopy",0,false},
    3330                              {NULL}
     
    252249
    253250    psFree(image);
    254 
    255     return 0;
    256 }
    257 
    258 // #547: psImageSubset shall create child image of a specified size from a parent psImage structure
    259 int testImageSubset(void)
    260 {
    261     psImage preSubsetStruct;
    262     psImage* original;
    263     psImage* subset1 = NULL;
    264     psImage* subset2 = NULL;
    265     psImage* subset3 = NULL;
    266     int c = 128;
    267     int r = 256;
    268 
    269     original = psImageAlloc(c,r,PS_TYPE_U32);
    270     for (int row=0;row<r;row++) {
    271         for (int col=0;col<c;col++) {
    272             original->data.F32[row][col] = row*1000+col;
    273         }
    274     }
    275 
    276     memcpy(&preSubsetStruct,original,sizeof(psImage));
    277 
    278     subset2 = psImageSubset(original,c/4,r/4,c/4+c/2,r/4+r/2);
    279 
    280     subset3 = psImageSubset(original,0,0,c/2,r/2);
    281 
    282     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure members nrow and ncol are equal to "
    283              "the input parameter nrow and ncol respectively.");
    284 
    285     if (subset2->numCols != c/2 || subset2->numRows != r/2) {
    286         psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
    287                 subset2->numCols, subset2->numRows, c/2,r/2);
    288         return 1;
    289     }
    290 
    291     if (subset3->numCols != c/2 || subset3->numRows != r/2) {
    292         psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
    293                 subset3->numCols, subset3->numRows, c/2,r/2);
    294         return 2;
    295     }
    296 
    297     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure contains expected values in the "
    298              "row member, if the input psImage structure image contains known values.");
    299 
    300     for (int row=0;row<r/2;row++) {
    301         for (int col=0;col<c/2;col++) {
    302             if (subset2->data.U32[row][col] != original->data.U32[row+r/4][col+c/4]) {
    303                 psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
    304                         row,col,subset2->data.U32[row][col], original->data.U32[row+r/4][col+c/4]);
    305                 return 3;
    306             }
    307             if (subset3->data.U32[row][col] != original->data.U32[row][col]) {
    308                 psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
    309                         row,col,subset2->data.U32[row][col], original->data.U32[row][col]);
    310                 return 4;
    311             }
    312         }
    313     }
    314 
    315     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member type is equal to the input "
    316              "psImage structure member type.");
    317 
    318     if (subset2->type.type != PS_TYPE_U32) {
    319         psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
    320                 subset2->type.type, PS_TYPE_U32);
    321         return 6;
    322     }
    323     if (subset3->type.type != PS_TYPE_U32) {
    324         psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
    325                 subset3->type.type, PS_TYPE_U32);
    326         return 7;
    327     }
    328 
    329     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure members row0 and col0 are equal to "
    330              "the input parameters row0 and col0 respectively.");
    331 
    332     if (subset2->col0 != c/4 || subset2->row0 != r/4) {
    333         psError(__func__,"psImageSubset didn't set col0/row0 for subset2 (%d/%d, should be %d/%d).",
    334                 subset2->col0,subset2->row0,c/4,r/4);
    335         return 8;
    336     }
    337     if (subset3->col0 != 0 || subset3->row0 != 0) {
    338         psError(__func__,"psImageSubset didn't set col0/row0 for subset3 (%d/%d, should be %d/%d).",
    339                 subset3->col0,subset3->row0,0,0);
    340         return 9;
    341     }
    342 
    343     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member parent is equal to the "
    344              "input psImage structure pointer image.");
    345 
    346     if (subset2->parent != original || subset3->parent != original) {
    347         psError(__func__,"psImageSubset didn't set parent.");
    348         return 10;
    349     }
    350 
    351     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member children is null.");
    352 
    353     if (subset2->children != NULL || subset3->children != NULL) {
    354         psError(__func__,"psImageSubset didn't set children to NULL.");
    355         return 11;
    356     }
    357 
    358     psLogMsg(__func__,PS_LOG_INFO,"Verify the input psImage structure image only has the following members "
    359              "changed: 1) Nchildren is increased by one. 2) parent contains pointer psImage structure "
    360              "out at parent[Nchildren-1].");
    361 
    362     if (original->children == NULL || original->children->n != 2) {
    363         psError(__func__,"psImageSubset didn't increment number of children by one per subset.");
    364         return 12;
    365     }
    366     if (original->children->data[0] != subset2 || original->children->data[1] != subset3) {
    367         psError(__func__,"psImageSubset didn't properly store the children pointers.");
    368         return 13;
    369     }
    370 
    371     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
    372              "execution doesn't stop, if the input parameter image is null. Also verified the input "
    373              "psImage structure is not modified.");
    374 
    375     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    376     subset1 = psImageSubset(NULL,0,0,c/2,r/2);
    377     if (subset1 != NULL) {
    378         psError(__func__,"psImageSubset didn't return NULL when input image was NULL.");
    379         return 14;
    380     }
    381 
    382     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
    383              " execution doesn't stop, if the input parameters nrow and/or ncol are zero. Also verify "
    384              "input psImage structure is not modified.");
    385 
    386     memcpy(&preSubsetStruct,original,sizeof(psImage));
    387     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    388     subset1 = psImageSubset(original,0,r/2,c/2,r/2);
    389     if (subset1 != NULL) {
    390         psError(__func__,"psImageSubset didn't return NULL when numRows=0.");
    391         return 15;
    392     }
    393     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    394     subset1 = psImageSubset(original,c/2,0,c/2,r/2);
    395     if (subset1 != NULL) {
    396         psError(__func__,"psImageSubset didn't return NULL when numCols=0.");
    397         return 16;
    398     }
    399     if (memcmp(original,&preSubsetStruct,sizeof(psImage)) != 0) {
    400         psError(__func__,"psImageSubset changed the original struct though it failed to subset.");
    401         return 17;
    402     }
    403 
    404 
    405     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
    406              "execution doesn't stop, if the input parameters row0 and col0 are not within the range of "
    407              "values of psImage structure image.");
    408 
    409     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    410     subset1 = psImageSubset(original,0,0,c/2,r*2);
    411     if (subset1 != NULL) {
    412         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
    413                 "image (via cols).");
    414         return 18;
    415     }
    416     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    417     subset1 = psImageSubset(original,0,0,c*2,r/2);
    418     if (subset1 != NULL) {
    419         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
    420                 "image (via rows).");
    421         return 19;
    422     }
    423     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    424     subset1 = psImageSubset(original,-1,0,c/2,r/2);
    425     if (subset1 != NULL) {
    426         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
    427                 "image (col0=-1).");
    428         return 20;
    429     }
    430     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    431     subset1 = psImageSubset(original,0,-1,c/2,r/2);
    432     if (subset1 != NULL) {
    433         psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
    434                 "image (row0=-1).");
    435         return 21;
    436     }
    437 
    438     psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
    439              "execution doesn't stop if the input parameters nrow, ncol, row0 and col0 specify a range of "
    440              "data not within the input psImage structure image.  Also verify the input psImage structure "
    441              "is not modified.");
    442 
    443     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    444     subset1 = psImageSubset(original,0,0,c/2,r+1);
    445     if (subset1 != NULL) {
    446         psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via rows).");
    447         return 22;
    448     }
    449     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    450     subset1 = psImageSubset(original,0,0,c+1,r/2);
    451     if (subset1 != NULL) {
    452         psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via cols).");
    453         return 23;
    454     }
    455     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
    456     subset1 = psImageSubset(original,0,0,c+1,r+1);
    457     if (subset1 != NULL) {
    458         psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via row+cols).");
    459         return 24;
    460     }
    461 
    462     psLogMsg(__func__, PS_LOG_INFO, "psImageFreeChildren shall deallocate any children images of a "
    463              "psImage structure");
    464 
    465     memcpy(&preSubsetStruct,original,sizeof(psImage));
    466 
    467     psImageFreeChildren(original);
    468 
    469     // Verify the returned psImage structure member Nchildren is set to zero.
    470     if (original->children != NULL && original->children->n > 0) {
    471         psError(__func__,"psImageFreeChildren didn't set number of children to zero.");
    472         return 25;
    473     }
    474 
    475     //Verify the returned psImage structure members type, nrow, ncol, row0, col0, rows and parent are not
    476     // modified.
    477     if (preSubsetStruct.numRows != original->numRows ||
    478             preSubsetStruct.numCols != original->numCols ||
    479             preSubsetStruct.row0 != original->row0 ||
    480             preSubsetStruct.col0 != original->col0) {
    481 
    482         psError(__func__,"psImageFreeChildren modified parent's non-children elements.");
    483         return 27;
    484     }
    485 
    486     psFree(original);
    487251
    488252    return 0;
  • trunk/psLib/test/image/tst_psImageExtraction.c

    r1924 r1929  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2004-09-29 01:10:27 $
     8*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2004-09-29 20:17:58 $
    1010*
    1111*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1212*/
    1313#include<stdlib.h>
     14#include<string.h>
    1415
    1516#include "psTest.h"
     
    1718#include "psType.h"
    1819
    19 static int testImageSlice( void );
     20static int testImageSlice(void);
     21static int testImageSubset(void);
     22static int testImageSubsection(void);
    2023
    2124testDescription tests[] = {
     25                              {testImageSubset,547,"psImageSubset",0,false},
     26                              {testImageSubset,550,"psImageSubset",0,true},
     27                              {testImageSubsection,730,"psImageSubsection",0,true},
    2228                              {testImageSlice, 552, "psImageSlice", 0, false},
    2329                              {NULL}
     
    2935}
    3036
    31 int testImageSlice( void )
     37int testImageSlice(void)
    3238{
    3339    const int r = 1000;
     
    286292}
    287293
     294// #547: psImageSubset shall create child image of a specified size from a parent psImage structure
     295int testImageSubset(void)
     296{
     297    psImage preSubsetStruct;
     298    psImage* original;
     299    psImage* subset1 = NULL;
     300    psImage* subset2 = NULL;
     301    psImage* subset3 = NULL;
     302    int c = 128;
     303    int r = 256;
     304
     305    original = psImageAlloc(c,r,PS_TYPE_U32);
     306    for (int row=0;row<r;row++) {
     307        for (int col=0;col<c;col++) {
     308            original->data.F32[row][col] = row*1000+col;
     309        }
     310    }
     311
     312    memcpy(&preSubsetStruct,original,sizeof(psImage));
     313
     314    subset2 = psImageSubset(original,c/4,r/4,c/4+c/2,r/4+r/2);
     315
     316    subset3 = psImageSubset(original,0,0,c/2,r/2);
     317
     318    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure members nrow and ncol are equal to "
     319             "the input parameter nrow and ncol respectively.");
     320
     321    if (subset2->numCols != c/2 || subset2->numRows != r/2) {
     322        psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
     323                subset2->numCols, subset2->numRows, c/2,r/2);
     324        return 1;
     325    }
     326
     327    if (subset3->numCols != c/2 || subset3->numRows != r/2) {
     328        psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
     329                subset3->numCols, subset3->numRows, c/2,r/2);
     330        return 2;
     331    }
     332
     333    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure contains expected values in the "
     334             "row member, if the input psImage structure image contains known values.");
     335
     336    for (int row=0;row<r/2;row++) {
     337        for (int col=0;col<c/2;col++) {
     338            if (subset2->data.U32[row][col] != original->data.U32[row+r/4][col+c/4]) {
     339                psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
     340                        row,col,subset2->data.U32[row][col], original->data.U32[row+r/4][col+c/4]);
     341                return 3;
     342            }
     343            if (subset3->data.U32[row][col] != original->data.U32[row][col]) {
     344                psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
     345                        row,col,subset2->data.U32[row][col], original->data.U32[row][col]);
     346                return 4;
     347            }
     348        }
     349    }
     350
     351    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member type is equal to the input "
     352             "psImage structure member type.");
     353
     354    if (subset2->type.type != PS_TYPE_U32) {
     355        psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
     356                subset2->type.type, PS_TYPE_U32);
     357        return 6;
     358    }
     359    if (subset3->type.type != PS_TYPE_U32) {
     360        psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
     361                subset3->type.type, PS_TYPE_U32);
     362        return 7;
     363    }
     364
     365    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure members row0 and col0 are equal to "
     366             "the input parameters row0 and col0 respectively.");
     367
     368    if (subset2->col0 != c/4 || subset2->row0 != r/4) {
     369        psError(__func__,"psImageSubset didn't set col0/row0 for subset2 (%d/%d, should be %d/%d).",
     370                subset2->col0,subset2->row0,c/4,r/4);
     371        return 8;
     372    }
     373    if (subset3->col0 != 0 || subset3->row0 != 0) {
     374        psError(__func__,"psImageSubset didn't set col0/row0 for subset3 (%d/%d, should be %d/%d).",
     375                subset3->col0,subset3->row0,0,0);
     376        return 9;
     377    }
     378
     379    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member parent is equal to the "
     380             "input psImage structure pointer image.");
     381
     382    if (subset2->parent != original || subset3->parent != original) {
     383        psError(__func__,"psImageSubset didn't set parent.");
     384        return 10;
     385    }
     386
     387    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member children is null.");
     388
     389    if (subset2->children != NULL || subset3->children != NULL) {
     390        psError(__func__,"psImageSubset didn't set children to NULL.");
     391        return 11;
     392    }
     393
     394    psLogMsg(__func__,PS_LOG_INFO,"Verify the input psImage structure image only has the following members "
     395             "changed: 1) Nchildren is increased by one. 2) parent contains pointer psImage structure "
     396             "out at parent[Nchildren-1].");
     397
     398    if (original->children == NULL || original->children->n != 2) {
     399        psError(__func__,"psImageSubset didn't increment number of children by one per subset.");
     400        return 12;
     401    }
     402    if (original->children->data[0] != subset2 || original->children->data[1] != subset3) {
     403        psError(__func__,"psImageSubset didn't properly store the children pointers.");
     404        return 13;
     405    }
     406
     407    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
     408             "execution doesn't stop, if the input parameter image is null. Also verified the input "
     409             "psImage structure is not modified.");
     410
     411    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     412    subset1 = psImageSubset(NULL,0,0,c/2,r/2);
     413    if (subset1 != NULL) {
     414        psError(__func__,"psImageSubset didn't return NULL when input image was NULL.");
     415        return 14;
     416    }
     417
     418    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
     419             " execution doesn't stop, if the input parameters nrow and/or ncol are zero. Also verify "
     420             "input psImage structure is not modified.");
     421
     422    memcpy(&preSubsetStruct,original,sizeof(psImage));
     423    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     424    subset1 = psImageSubset(original,0,r/2,c/2,r/2);
     425    if (subset1 != NULL) {
     426        psError(__func__,"psImageSubset didn't return NULL when numRows=0.");
     427        return 15;
     428    }
     429    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     430    subset1 = psImageSubset(original,c/2,0,c/2,r/2);
     431    if (subset1 != NULL) {
     432        psError(__func__,"psImageSubset didn't return NULL when numCols=0.");
     433        return 16;
     434    }
     435    if (memcmp(original,&preSubsetStruct,sizeof(psImage)) != 0) {
     436        psError(__func__,"psImageSubset changed the original struct though it failed to subset.");
     437        return 17;
     438    }
     439
     440
     441    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
     442             "execution doesn't stop, if the input parameters row0 and col0 are not within the range of "
     443             "values of psImage structure image.");
     444
     445    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     446    subset1 = psImageSubset(original,0,0,c/2,r*2);
     447    if (subset1 != NULL) {
     448        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     449                "image (via cols).");
     450        return 18;
     451    }
     452    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     453    subset1 = psImageSubset(original,0,0,c*2,r/2);
     454    if (subset1 != NULL) {
     455        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     456                "image (via rows).");
     457        return 19;
     458    }
     459    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     460    subset1 = psImageSubset(original,-1,0,c/2,r/2);
     461    if (subset1 != NULL) {
     462        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     463                "image (col0=-1).");
     464        return 20;
     465    }
     466    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     467    subset1 = psImageSubset(original,0,-1,c/2,r/2);
     468    if (subset1 != NULL) {
     469        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
     470                "image (row0=-1).");
     471        return 21;
     472    }
     473
     474    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
     475             "execution doesn't stop if the input parameters nrow, ncol, row0 and col0 specify a range of "
     476             "data not within the input psImage structure image.  Also verify the input psImage structure "
     477             "is not modified.");
     478
     479    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     480    subset1 = psImageSubset(original,0,0,c/2,r+1);
     481    if (subset1 != NULL) {
     482        psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via rows).");
     483        return 22;
     484    }
     485    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     486    subset1 = psImageSubset(original,0,0,c+1,r/2);
     487    if (subset1 != NULL) {
     488        psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via cols).");
     489        return 23;
     490    }
     491    psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     492    subset1 = psImageSubset(original,0,0,c+1,r+1);
     493    if (subset1 != NULL) {
     494        psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via row+cols).");
     495        return 24;
     496    }
     497
     498    psLogMsg(__func__, PS_LOG_INFO, "psImageFreeChildren shall deallocate any children images of a "
     499             "psImage structure");
     500
     501    memcpy(&preSubsetStruct,original,sizeof(psImage));
     502
     503    psImageFreeChildren(original);
     504
     505    // Verify the returned psImage structure member Nchildren is set to zero.
     506    if (original->children != NULL && original->children->n > 0) {
     507        psError(__func__,"psImageFreeChildren didn't set number of children to zero.");
     508        return 25;
     509    }
     510
     511    //Verify the returned psImage structure members type, nrow, ncol, row0, col0, rows and parent are not
     512    // modified.
     513    if (preSubsetStruct.numRows != original->numRows ||
     514            preSubsetStruct.numCols != original->numCols ||
     515            preSubsetStruct.row0 != original->row0 ||
     516            preSubsetStruct.col0 != original->col0) {
     517
     518        psError(__func__,"psImageFreeChildren modified parent's non-children elements.");
     519        return 27;
     520    }
     521
     522    psFree(original);
     523
     524    return 0;
     525}
     526
     527// #547: psImageSubset shall create child image of a specified size from a parent psImage structure
     528int testImageSubsection(void)
     529{
     530    psImage* original;
     531    psImage* subset;
     532    int c = 128;
     533    int r = 256;
     534    int i;
     535    int numRegions = 4;
     536    int x1[] = {  0, 32, 64, 32};
     537    int x2[] = { 32, 64,127, 64};
     538    int y1[] = {  0, 32, 32,128};
     539    int y2[] = { 32, 64, 64,255};
     540
     541    original = psImageAlloc(c,r,PS_TYPE_U32);
     542    for (int row=0;row<r;row++) {
     543        for (int col=0;col<c;col++) {
     544            original->data.F32[row][col] = row*1000+col;
     545        }
     546    }
     547
     548    for (i=0; i<numRegions; i++) {
     549        char sectionStr[64];
     550        sprintf(sectionStr,"[%d:%d,%d:%d]",x1[i],x2[i],y1[i],y2[i]);
     551
     552        psLogMsg(__func__,PS_LOG_INFO,"Testing subsection %s.",
     553                 sectionStr);
     554
     555        subset = psImageSubsection(original,sectionStr);
     556
     557        if (subset == NULL) {
     558            psError(__func__,"psImageSubsection returned a NULL with a subset of %s.",
     559                    sectionStr);
     560            return 10*i+1;
     561        }
     562
     563        if (subset->type.type != PS_TYPE_U32) {
     564            psError(__func__,"psImageSubsection output type was not proper(%d, should be %d).",
     565                    subset->type.type, PS_TYPE_U32);
     566            return 10*i+2;
     567        }
     568
     569        if (subset->col0 != x1[i] || subset->row0 != y1[i]) {
     570            psError(__func__,"psImageSubsection didn't set properly col0/row0 (%d/%d, should be %d/%d).",
     571                    subset->col0,subset->row0,x1[i],y1[i]);
     572            return 10*i+3;
     573        }
     574
     575        if (subset->parent != original) {
     576            psError(__func__,"psImageSubsection didn't set parent.");
     577            return 10*i+4;
     578        }
     579
     580        if (subset->children != NULL) {
     581            psError(__func__,"psImageSubsection didn't set children to NULL.");
     582            return 10*i+5;
     583        }
     584
     585        if (original->children == NULL || original->children->n != i+1) {
     586            psError(__func__,"psImageSubsection didn't increment number of children by one per subset.");
     587            return 10*i+6;
     588        }
     589
     590
     591        if (original->children->data[i] != subset) {
     592            psError(__func__,"psImageSubsection didn't properly store the children pointer.");
     593            return 10*i+7;
     594        }
     595
     596        int numCols = x2[i]-x1[i]+1;
     597        int numRows = y2[i]-y1[i]+1;
     598        if (subset->numCols != numCols || subset->numRows != numRows) {
     599            psError(__func__,"psImageSubsection output size was not proper(%dx%d, should be %dx%d).",
     600                    subset->numCols, subset->numRows, numCols, numRows);
     601            return 10*i+8;
     602        }
     603
     604        for (int row=0;row<numRows;row++) {
     605            for (int col=0;col<numCols;col++) {
     606                if (subset->data.U32[row][col] != original->data.U32[row+y1[i]][col+x1[i]]) {
     607                    psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
     608                            row,col,subset->data.U32[row][col], original->data.U32[row+y1[i]][col+x1[i]]);
     609                    return 10*i+9;
     610                }
     611            }
     612        }
     613    }
     614
     615    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (x1>x2)");
     616    subset = psImageSubsection(original,"[64:32,32:64]");
     617    if (subset != NULL) {
     618        psError(__func__,"psImageSubsection didn't return NULL when x1 > x2.");
     619        return 10*i+10;
     620    }
     621
     622    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (y1>y2)");
     623    subset = psImageSubsection(original,"[32:64,64:32]");
     624    if (subset != NULL) {
     625        psError(__func__,"psImageSubsection didn't return NULL when y1 > y2.");
     626        return 10*i+11;
     627    }
     628
     629    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (x2>nCols)");
     630    subset = psImageSubsection(original,"[64:256,32:64]"); // assumes c<256
     631    if (subset != NULL) {
     632        psError(__func__,"psImageSubsection didn't return NULL when x2 > c.");
     633        return 10*i+12;
     634    }
     635
     636    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (y2>=nRows)");
     637    subset = psImageSubsection(original,"[32:64,64:256]"); // assumes r==256
     638    if (subset != NULL) {
     639        psError(__func__,"psImageSubsection didn't return NULL when y2 > r.");
     640        return 10*i+13;
     641    }
     642
     643    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (malformed string - no brackets)");
     644    subset = psImageSubsection(original,"32:64,32:64");
     645    if (subset != NULL) {
     646        psError(__func__,"psImageSubsection didn't return NULL when subsection was '32:64,32:64'.");
     647        return 10*i+14;
     648    }
     649
     650    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (malformed string - no colons)");
     651    subset = psImageSubsection(original,"[32-64,32-64]");
     652    if (subset != NULL) {
     653        psError(__func__,"psImageSubsection didn't return NULL when subsection was '[32-64,32-64]'.");
     654        return 10*i+15;
     655    }
     656
     657    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (malformed string - not four numbers)");
     658    subset = psImageSubsection(original,"[32:64,32]");
     659    if (subset != NULL) {
     660        psError(__func__,"psImageSubsection didn't return NULL when subsection was '[32:64,32]'.");
     661        return 10*i+16;
     662    }
     663
     664    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (image is NULL)");
     665    subset = psImageSubsection(NULL,"[32:64,32:64]");
     666    if (subset != NULL) {
     667        psError(__func__,"psImageSubsection didn't return NULL when image was NULL.");
     668        return 10*i+17;
     669    }
     670
     671    psLogMsg(__func__,PS_LOG_INFO,"An error should follow (subsection string is NULL)");
     672    subset = psImageSubsection(original,NULL);
     673    if (subset != NULL) {
     674        psError(__func__,"psImageSubsection didn't return NULL when subsection was NULL.");
     675        return 10*i+18;
     676    }
     677
     678    psFree(original);
     679
     680    return 0;
     681}
  • trunk/psLib/test/image/tst_psImageManip.c

    r1926 r1929  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-09-29 19:50:43 $
     8 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-09-29 20:17:58 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636
    3737testDescription tests[] = {
    38                               {
    39                                   testImageClip,571,"psImageClip",0,false
    40                               },
    41                               {
    42                                   testImageClipNAN,572,"psImageClipNAN",0,false
    43                               },
    44                               {
    45                                   testImageClipComplexRegion,673,"psImageClipComplexRegion",0,false
    46                               },
    47                               {
    48                                   testImageOverlay,573,"psImageOverlay",0,false
    49                               },
    50                               {
    51                                   testImageRebin,559,"psImageRebin",0,false
    52                               },
    53                               {
    54                                   testImageRoll,562,"psImageRoll",0,false
    55                               },
    56                               {
    57                                   testImageRotate,560,"psImageRotate",0,false
    58                               },
    59                               {
    60                                   testImageShift,561,"psImageShift",0,false
    61                               },
    62                               {
    63                                   NULL
    64                               }
     38                              {testImageClip,571,"psImageClip",0,false},
     39                              {testImageClipNAN,572,"psImageClipNAN",0,false},
     40                              {testImageClipComplexRegion,673,"psImageClipComplexRegion",0,false},
     41                              {testImageOverlay,573,"psImageOverlay",0,false},
     42                              {testImageRebin,559,"psImageRebin",0,false},
     43                              {testImageRoll,562,"psImageRoll",0,false},
     44                              {testImageRotate,560,"psImageRotate",0,false},
     45                              {testImageShift,561,"psImageShift",0,false},
     46                              {NULL}
    6547                          };
    6648
  • trunk/psLib/test/image/verified/tst_psImage.stderr

    r1920 r1929  
    9090/***************************** TESTPOINT ******************************************\
    9191*             TestFile: tst_psImage.c                                              *
    92 *            TestPoint: psImage{psImageSubset}                                     *
    93 *             TestType: Positive                                                   *
    94 \**********************************************************************************/
    95 
    96 <DATE><TIME>|<HOST>|I|testImageSubset
    97     Verify the returned psImage structure members nrow and ncol are equal to the input parameter nrow and ncol respectively.
    98 <DATE><TIME>|<HOST>|I|testImageSubset
    99     Verify the returned psImage structure contains expected values in the row member, if the input psImage structure image contains known values.
    100 <DATE><TIME>|<HOST>|I|testImageSubset
    101     Verify the returned psImage structure member type is equal to the input psImage structure member type.
    102 <DATE><TIME>|<HOST>|I|testImageSubset
    103     Verify the returned psImage structure members row0 and col0 are equal to the input parameters row0 and col0 respectively.
    104 <DATE><TIME>|<HOST>|I|testImageSubset
    105     Verify the returned psImage structure member parent is equal to the input psImage structure pointer image.
    106 <DATE><TIME>|<HOST>|I|testImageSubset
    107     Verify the returned psImage structure member children is null.
    108 <DATE><TIME>|<HOST>|I|testImageSubset
    109     Verify the input psImage structure image only has the following members changed: 1) Nchildren is increased by one. 2) parent contains pointer psImage structure out at parent[Nchildren-1].
    110 <DATE><TIME>|<HOST>|I|testImageSubset
    111     Verify the returned psImage structure pointer is null and program execution doesn't stop, if the input parameter image is null. Also verified the input psImage structure is not modified.
    112 <DATE><TIME>|<HOST>|I|testImageSubset
    113     An error should follow...
    114 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    115     Can not operate on a NULL psImage.
    116 <DATE><TIME>|<HOST>|I|testImageSubset
    117     Verify the returned psImage structure pointer is null and program  execution doesn't stop, if the input parameters nrow and/or ncol are zero. Also verify input psImage structure is not modified.
    118 <DATE><TIME>|<HOST>|I|testImageSubset
    119     An error should follow...
    120 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    121     Specified subset range, [0:<LINENO>,128:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    122 <DATE><TIME>|<HOST>|I|testImageSubset
    123     An error should follow...
    124 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    125     Specified subset range, [64:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    126 <DATE><TIME>|<HOST>|I|testImageSubset
    127     Verify the returned psImage structure pointer is null and program execution doesn't stop, if the input parameters row0 and col0 are not within the range of values of psImage structure image.
    128 <DATE><TIME>|<HOST>|I|testImageSubset
    129     An error should follow...
    130 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    131     Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    132 <DATE><TIME>|<HOST>|I|testImageSubset
    133     An error should follow...
    134 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    135     Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    136 <DATE><TIME>|<HOST>|I|testImageSubset
    137     An error should follow...
    138 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    139     Specified subset range, [-1:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    140 <DATE><TIME>|<HOST>|I|testImageSubset
    141     An error should follow...
    142 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    143     Specified subset range, [0:<LINENO>,-1:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    144 <DATE><TIME>|<HOST>|I|testImageSubset
    145     Verify the returned psImage structure pointer is null and program execution doesn't stop if the input parameters nrow, ncol, row0 and col0 specify a range of data not within the input psImage structure image.  Also verify the input psImage structure is not modified.
    146 <DATE><TIME>|<HOST>|I|testImageSubset
    147     An error should follow...
    148 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    149     Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    150 <DATE><TIME>|<HOST>|I|testImageSubset
    151     An error should follow...
    152 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    153     Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    154 <DATE><TIME>|<HOST>|I|testImageSubset
    155     An error should follow...
    156 <DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
    157     Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
    158 <DATE><TIME>|<HOST>|I|testImageSubset
    159     psImageFreeChildren shall deallocate any children images of a psImage structure
    160 
    161 ---> TESTPOINT PASSED (psImage{psImageSubset} | tst_psImage.c)
    162 
    163 /***************************** TESTPOINT ******************************************\
    164 *             TestFile: tst_psImage.c                                              *
    16592*            TestPoint: psImage{psImageCopy}                                       *
    16693*             TestType: Positive                                                   *
  • trunk/psLib/test/image/verified/tst_psImageExtraction.stderr

    r1924 r1929  
     1/***************************** TESTPOINT ******************************************\
     2*             TestFile: tst_psImageExtraction.c                                    *
     3*            TestPoint: psImage{psImageSubset}                                     *
     4*             TestType: Positive                                                   *
     5\**********************************************************************************/
     6
     7<DATE><TIME>|<HOST>|I|testImageSubset
     8    Verify the returned psImage structure members nrow and ncol are equal to the input parameter nrow and ncol respectively.
     9<DATE><TIME>|<HOST>|I|testImageSubset
     10    Verify the returned psImage structure contains expected values in the row member, if the input psImage structure image contains known values.
     11<DATE><TIME>|<HOST>|I|testImageSubset
     12    Verify the returned psImage structure member type is equal to the input psImage structure member type.
     13<DATE><TIME>|<HOST>|I|testImageSubset
     14    Verify the returned psImage structure members row0 and col0 are equal to the input parameters row0 and col0 respectively.
     15<DATE><TIME>|<HOST>|I|testImageSubset
     16    Verify the returned psImage structure member parent is equal to the input psImage structure pointer image.
     17<DATE><TIME>|<HOST>|I|testImageSubset
     18    Verify the returned psImage structure member children is null.
     19<DATE><TIME>|<HOST>|I|testImageSubset
     20    Verify the input psImage structure image only has the following members changed: 1) Nchildren is increased by one. 2) parent contains pointer psImage structure out at parent[Nchildren-1].
     21<DATE><TIME>|<HOST>|I|testImageSubset
     22    Verify the returned psImage structure pointer is null and program execution doesn't stop, if the input parameter image is null. Also verified the input psImage structure is not modified.
     23<DATE><TIME>|<HOST>|I|testImageSubset
     24    An error should follow...
     25<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     26    Can not operate on a NULL psImage.
     27<DATE><TIME>|<HOST>|I|testImageSubset
     28    Verify the returned psImage structure pointer is null and program  execution doesn't stop, if the input parameters nrow and/or ncol are zero. Also verify input psImage structure is not modified.
     29<DATE><TIME>|<HOST>|I|testImageSubset
     30    An error should follow...
     31<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     32    Specified subset range, [0:<LINENO>,128:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     33<DATE><TIME>|<HOST>|I|testImageSubset
     34    An error should follow...
     35<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     36    Specified subset range, [64:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     37<DATE><TIME>|<HOST>|I|testImageSubset
     38    Verify the returned psImage structure pointer is null and program execution doesn't stop, if the input parameters row0 and col0 are not within the range of values of psImage structure image.
     39<DATE><TIME>|<HOST>|I|testImageSubset
     40    An error should follow...
     41<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     42    Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     43<DATE><TIME>|<HOST>|I|testImageSubset
     44    An error should follow...
     45<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     46    Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     47<DATE><TIME>|<HOST>|I|testImageSubset
     48    An error should follow...
     49<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     50    Specified subset range, [-1:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     51<DATE><TIME>|<HOST>|I|testImageSubset
     52    An error should follow...
     53<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     54    Specified subset range, [0:<LINENO>,-1:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     55<DATE><TIME>|<HOST>|I|testImageSubset
     56    Verify the returned psImage structure pointer is null and program execution doesn't stop if the input parameters nrow, ncol, row0 and col0 specify a range of data not within the input psImage structure image.  Also verify the input psImage structure is not modified.
     57<DATE><TIME>|<HOST>|I|testImageSubset
     58    An error should follow...
     59<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     60    Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     61<DATE><TIME>|<HOST>|I|testImageSubset
     62    An error should follow...
     63<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     64    Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     65<DATE><TIME>|<HOST>|I|testImageSubset
     66    An error should follow...
     67<DATE><TIME>|<HOST>|E|psLib.image.psImageSubset
     68    Specified subset range, [0:<LINENO>,0:<LINENO>], is invalid or outside input psImage's boundaries, [0:<LINENO>,0:<LINENO>].
     69<DATE><TIME>|<HOST>|I|testImageSubset
     70    psImageFreeChildren shall deallocate any children images of a psImage structure
     71
     72---> TESTPOINT PASSED (psImage{psImageSubset} | tst_psImageExtraction.c)
     73
    174/***************************** TESTPOINT ******************************************\
    275*             TestFile: tst_psImageExtraction.c                                    *
Note: See TracChangeset for help on using the changeset viewer.