Index: trunk/psModules/test/tst_pmReadoutCombine.c
===================================================================
--- trunk/psModules/test/tst_pmReadoutCombine.c	(revision 2812)
+++ trunk/psModules/test/tst_pmReadoutCombine.c	(revision 2815)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-23 23:16:36 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-23 23:57:32 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -22,10 +22,5 @@
                           };
 
-#define OUTPUT_ROWS_BASE 8
-#define OUTPUT_COLS_BASE 16
-#define OUTPUT_ROWS_NUM  32
-#define OUTPUT_COLS_NUM  32
 #define NUM_READOUTS  10
-#define OUT_IMAGE_SIZE 10
 
 int main(int argc, char* argv[])
@@ -36,7 +31,5 @@
 int doit()
 {
-    return(0);
     int i;
-    int j;
     int r;
     psList *list = NULL;
@@ -84,11 +77,5 @@
 
         psImage *tmpImage = psImageAlloc(numCols[r], numRows[r], PS_TYPE_F32);
-        for (i=0;i<numRows[r];i++) {
-            for (j=0;j<numCols[r];j++) {
-                tmpImage->data.F32[i][j] = (float) (i + j);
-                tmpImage->data.F32[i][j] = 1.0;
-                tmpImage->data.F32[i][j] = (float) r;
-            }
-        }
+        PS_IMAGE_SET_F32(tmpImage, ((float) r));
 
         *(int *) (& (tmpImage->row0)) = baseRows[r];
@@ -113,102 +100,6 @@
     output = pmReadoutCombine(output, list, params, zero, scale, true, 1.0, 0.0);
 
-    for (i=output->row0; i < (output->row0 + output->numRows) ; i++) {
-        for (j=output->col0; j < (output->col0 + output->numCols) ; j++) {
-            printf("%.1f ", output->data.F32[i-output->row0][j-output->col0]);
-        }
-        printf("\n");
-    }
-
-    psFree(params->stats);
-    psFree(params);
-    psFree(output);
-    psFree(zero);
-    psFree(scale);
-
-    psListElem *tmpInput = (psListElem *) list->head;
-    while (NULL != tmpInput) {
-        psReadout *tmpReadout = (psReadout *) tmpInput->data;
-        psFree(tmpReadout);
-        tmpInput = tmpInput->next;
-    }
-    psFree(list);
-
-    return(0);
-}
-
-#define EIGHT 8
-int quarters()
-{
-    int i;
-    int j;
-    int r;
-    psList *list = NULL;
-    int baseRowsReadout[EIGHT];
-    int baseColsReadout[EIGHT];
-    int baseRows[EIGHT];
-    int baseCols[EIGHT];
-    int numRows[EIGHT];
-    int numCols[EIGHT];
-    int minOutRow = 10000;
-    int minOutCol = 10000;
-    int maxOutRow = -1;
-    int maxOutCol = -1;
-    psImage *output = NULL;
-    psCombineParams *params = (psCombineParams *) psAlloc(sizeof(psCombineParams));
-    psVector *zero = psVectorAlloc(EIGHT, PS_TYPE_F32);
-    psVector *scale = psVectorAlloc(EIGHT, PS_TYPE_F32);
-    for (i=0;i<EIGHT;i++) {
-        zero->data.F32[i] = 1.0;
-    }
-    for (i=0;i<EIGHT;i++) {
-        scale->data.F32[i] = 2.0;
-    }
-
-    params->stats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
-    params->maskVal = 1;
-    params->fracLow = 0.0;
-    params->fracHigh = 10000.0;
-    params->nKeep = 0;
-
-    for (r=0;r<EIGHT;r++) {
-        baseRowsReadout[r] = 0;
-        baseColsReadout[r] = 0;
-        baseRows[r] = 0;
-        baseCols[r] = 0;
-        numRows[r] = 10;
-        numCols[r] = 10;
-
-        psImage *tmpImage = psImageAlloc(numCols[r], numRows[r], PS_TYPE_F32);
-        for (i=0;i<numRows[r];i++) {
-            for (j=0;j<numCols[r];j++) {
-                tmpImage->data.F32[i][j] = (float) (i + j);
-                tmpImage->data.F32[i][j] = 1.0;
-                tmpImage->data.F32[i][j] = (float) r;
-            }
-        }
-
-        *(int *) (& (tmpImage->row0)) = baseRows[r];
-        *(int *) (& (tmpImage->col0)) = baseCols[r];
-        psReadout *tmpReadout = psReadoutAlloc(baseColsReadout[r],
-                                               baseRowsReadout[r],
-                                               tmpImage);
-        minOutRow = PS_MIN(minOutRow, (baseRowsReadout[r] + baseRows[r]));
-        minOutCol = PS_MIN(minOutCol, (baseColsReadout[r] + baseCols[r]));
-        maxOutRow = PS_MAX(maxOutRow, (baseRowsReadout[r] + baseRows[r] + numRows[r]));
-        maxOutCol = PS_MAX(maxOutCol, (baseColsReadout[r] + baseCols[r] + numCols[r]));
-
-        if (r == 0) {
-            list = psListAlloc(tmpReadout);
-        } else {
-            psListAdd(list, PS_LIST_HEAD, tmpReadout);
-        }
-    }
-    printf("tst_pmReadoutCombine(): (minOutRow, minOutCol) to (maxOutRow, maxOutCol) is (%d, %d) (%d, %d)\n",
-           minOutRow, minOutCol, maxOutRow, maxOutCol);
-
-    output = pmReadoutCombine(output, list, params, zero, scale, true, 1.0, 0.0);
-
-    for (i=output->row0; i < (output->row0 + output->numRows) ; i++) {
-        for (j=output->col0; j < (output->col0 + output->numCols) ; j++) {
+    for (int i=output->row0; i < (output->row0 + output->numRows) ; i++) {
+        for (int j=output->col0; j < (output->col0 + output->numCols) ; j++) {
             printf("%.1f ", output->data.F32[i-output->row0][j-output->col0]);
         }
@@ -261,5 +152,4 @@
 {
     int i;
-    int j;
     int r;
     psList *list = NULL;
@@ -302,11 +192,4 @@
 
     for (r=0;r<NUM_READOUTS;r++) {
-        baseRowsReadout[r] = r + 40;
-        baseColsReadout[r] = r + 42;
-        baseRows[r] = r;
-        baseCols[r] = r+2;
-        numRows[r] = 4 + (2 * r);
-        numCols[r] = 8 + (2 * r);
-
         baseRowsReadout[r] = 0;
         baseColsReadout[r] = 0;
@@ -317,12 +200,5 @@
 
         psImage *tmpImage = psImageAlloc(numCols[r], numRows[r], PS_TYPE_F32);
-        for (i=0;i<numRows[r];i++) {
-            for (j=0;j<numCols[r];j++) {
-                tmpImage->data.F32[i][j] = (float) (i + j);
-                tmpImage->data.F32[i][j] = 1.0;
-                tmpImage->data.F32[i][j] = (float) r;
-            }
-        }
-
+        PS_IMAGE_SET_F32(tmpImage, ((float) r));
         *(int *) (& (tmpImage->row0)) = baseRows[r];
         *(int *) (& (tmpImage->col0)) = baseCols[r];
