Index: /trunk/psModules/src/pmObjects.c
===================================================================
--- /trunk/psModules/src/pmObjects.c	(revision 3624)
+++ /trunk/psModules/src/pmObjects.c	(revision 3625)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-31 00:22:49 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-01 20:47:40 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -147,5 +147,5 @@
 
 /******************************************************************************
-pmFindVectorPeeks(vector, threshold): Find all local peaks in the given vector
+pmFindVectorPeaks(vector, threshold): Find all local peaks in the given vector
 above the given threshold.  Returns a vector of type PS_TYPE_U32 containing
 the location (x value) of all peaks.
@@ -157,5 +157,5 @@
 Depending upon actual use, this may need to be optimized.
  *****************************************************************************/
-psVector *pmFindVectorPeeks(const psVector *vector,
+psVector *pmFindVectorPeaks(const psVector *vector,
                             psF32 threshold)
 {
@@ -267,6 +267,7 @@
 MyListAddPeak(): A private function which allocates a psList, if the list
 argument is NULL, otherwise it adds the peak to that list.
- *****************************************************************************/
-// XXX: Switch row, col args?
+ 
+XXX: Switch row, col args?
+ *****************************************************************************/
 psList *MyListAddPeak(psList *list,
                       psS32 row,
@@ -275,5 +276,5 @@
                       psPeakType type)
 {
-    psPeak *tmpPeak = pmPeakAlloc(col, row, counts, type);
+    psPeak *tmpPeak = pmPeakAlloc(row, col, counts, type);
 
     if (list == NULL) {
@@ -287,5 +288,5 @@
 
 /******************************************************************************
-pmFindImagePeeks(image, threshold): Find all local peaks in the given psImage
+pmFindImagePeaks(image, threshold): Find all local peaks in the given psImage
 above the given threshold.  Returns a psList containing location (x/y value)
 of all peaks.
@@ -301,5 +302,5 @@
      Currently, we do not.
  *****************************************************************************/
-psList *pmFindImagePeeks(const psImage *image,
+psList *pmFindImagePeaks(const psImage *image,
                          psF32 threshold)
 {
@@ -319,5 +320,5 @@
     row = 0;
     tmpRow = p_psGetRowVectorFromImage((psImage *) image, row);
-    psVector *row1 = pmFindVectorPeeks(tmpRow, threshold);
+    psVector *row1 = pmFindVectorPeaks(tmpRow, threshold);
     for (psU32 i = 0 ; i < row1->n ; i++ ) {
         col = row1->data.U32[i];
@@ -355,5 +356,5 @@
 
         } else {
-            psError(PS_ERR_UNKNOWN, true, "peak specified valid colum range.");
+            psError(PS_ERR_UNKNOWN, true, "peak specified valid column range.");
         }
     }
@@ -370,45 +371,72 @@
     for (row = 1 ; row < (image->numRows - 1) ; row++) {
         tmpRow = p_psGetRowVectorFromImage((psImage *) image, 0);
-        row1 = pmFindVectorPeeks(tmpRow, threshold);
-
-        // Step through all local peask in this row.
+        row1 = pmFindVectorPeaks(tmpRow, threshold);
+
+        // Step through all local peaks in this row.
         for (psU32 i = 0 ; i < row1->n ; i++ ) {
+            psPeakType myType = PM_PEAK_UNDEF;
             col = row1->data.U32[i];
 
-            if ((image->data.F32[row][col] >= image->data.F32[row-1][col-1]) &&
-                    (image->data.F32[row][col] >  image->data.F32[row-1][col]) &&
-                    (image->data.F32[row][col] >= image->data.F32[row-1][col+1]) &&
-                    (image->data.F32[row][col] > image->data.F32[row][col-1]) &&
-                    (image->data.F32[row][col] >= image->data.F32[row][col+1]) &&
-                    (image->data.F32[row][col] >= image->data.F32[row+1][col-1]) &&
-                    (image->data.F32[row][col] >= image->data.F32[row+1][col]) &&
-                    (image->data.F32[row][col] >= image->data.F32[row+1][col+1])) {
-                if (image->data.F32[row][col] > threshold) {
-
-                    psPeakType myType = PM_PEAK_UNDEF;
-                    if ((image->data.F32[row][col] > image->data.F32[row-1][col-1]) &&
-                            (image->data.F32[row][col] > image->data.F32[row-1][col]) &&
-                            (image->data.F32[row][col] > image->data.F32[row-1][col+1]) &&
-                            (image->data.F32[row][col] > image->data.F32[row][col-1]) &&
-                            (image->data.F32[row][col] > image->data.F32[row][col+1]) &&
-                            (image->data.F32[row][col] > image->data.F32[row+1][col-1]) &&
-                            (image->data.F32[row][col] > image->data.F32[row+1][col]) &&
-                            (image->data.F32[row][col] > image->data.F32[row+1][col+1])) {
-                        myType = PM_PEAK_LONE;
-                    }
-                    if ((image->data.F32[row][col] == image->data.F32[row-1][col-1]) ||
-                            (image->data.F32[row][col] == image->data.F32[row-1][col]) ||
-                            (image->data.F32[row][col] == image->data.F32[row-1][col+1]) ||
-                            (image->data.F32[row][col] == image->data.F32[row][col-1]) ||
-                            (image->data.F32[row][col] == image->data.F32[row][col+1]) ||
-                            (image->data.F32[row][col] == image->data.F32[row+1][col-1]) ||
-                            (image->data.F32[row][col] == image->data.F32[row+1][col]) ||
-                            (image->data.F32[row][col] == image->data.F32[row+1][col+1])) {
-                        myType = PM_PEAK_FLAT;
-                    }
-
+            if (col == 0) {
+                // If col==0, then we can not read col-1 pixels
+                if ((image->data.F32[row][col] >  image->data.F32[row-1][col]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row-1][col+1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row][col+1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row+1][col]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row+1][col+1])) {
+                    myType = PM_PEAK_EDGE;
                     list = MyListAddPeak(list, row, col, image->data.F32[row][col], myType);
                 }
+            } else if (col < (image->numCols - 1)) {
+                // This is an interior pixel
+                if ((image->data.F32[row][col] >= image->data.F32[row-1][col-1]) &&
+                        (image->data.F32[row][col] >  image->data.F32[row-1][col]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row-1][col+1]) &&
+                        (image->data.F32[row][col] > image->data.F32[row][col-1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row][col+1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row+1][col-1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row+1][col]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row+1][col+1])) {
+                    if (image->data.F32[row][col] > threshold) {
+                        if ((image->data.F32[row][col] > image->data.F32[row-1][col-1]) &&
+                                (image->data.F32[row][col] > image->data.F32[row-1][col]) &&
+                                (image->data.F32[row][col] > image->data.F32[row-1][col+1]) &&
+                                (image->data.F32[row][col] > image->data.F32[row][col-1]) &&
+                                (image->data.F32[row][col] > image->data.F32[row][col+1]) &&
+                                (image->data.F32[row][col] > image->data.F32[row+1][col-1]) &&
+                                (image->data.F32[row][col] > image->data.F32[row+1][col]) &&
+                                (image->data.F32[row][col] > image->data.F32[row+1][col+1])) {
+                            myType = PM_PEAK_LONE;
+                        }
+
+                        if ((image->data.F32[row][col] == image->data.F32[row-1][col-1]) ||
+                                (image->data.F32[row][col] == image->data.F32[row-1][col]) ||
+                                (image->data.F32[row][col] == image->data.F32[row-1][col+1]) ||
+                                (image->data.F32[row][col] == image->data.F32[row][col-1]) ||
+                                (image->data.F32[row][col] == image->data.F32[row][col+1]) ||
+                                (image->data.F32[row][col] == image->data.F32[row+1][col-1]) ||
+                                (image->data.F32[row][col] == image->data.F32[row+1][col]) ||
+                                (image->data.F32[row][col] == image->data.F32[row+1][col+1])) {
+                            myType = PM_PEAK_FLAT;
+                        }
+
+                        list = MyListAddPeak(list, row, col, image->data.F32[row][col], myType);
+                    }
+                }
+            } else if (col == (image->numCols - 1)) {
+                // If col==numCols - 1, then we can not read col+1 pixels
+                if ((image->data.F32[row][col] >= image->data.F32[row-1][col-1]) &&
+                        (image->data.F32[row][col] >  image->data.F32[row-1][col]) &&
+                        (image->data.F32[row][col] > image->data.F32[row][col-1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row][col+1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row+1][col-1]) &&
+                        (image->data.F32[row][col] >= image->data.F32[row+1][col])) {
+                    myType = PM_PEAK_EDGE;
+                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], myType);
+                }
+            } else {
+                psError(PS_ERR_UNKNOWN, true, "peak specified valid column range.");
             }
+
         }
     }
@@ -419,5 +447,5 @@
     row = image->numRows - 1;
     tmpRow = p_psGetRowVectorFromImage((psImage *) image, row);
-    row1 = pmFindVectorPeeks(tmpRow, threshold);
+    row1 = pmFindVectorPeaks(tmpRow, threshold);
     for (psU32 i = 0 ; i < row1->n ; i++ ) {
         col = row1->data.U32[i];
@@ -482,5 +510,5 @@
 XXX: warning message if valid is NULL?
  *****************************************************************************/
-psList *pmCullPeeks(psList *peaks,
+psList *pmCullPeaks(psList *peaks,
                     psF32 maxValue,
                     const psRegion *valid)
@@ -492,5 +520,5 @@
     psS32 indexNum = 0;
 
-    //    printf("pmCullPeeks(): list size is %d\n", peaks->size);
+    //    printf("pmCullPeaks(): list size is %d\n", peaks->size);
     while (tmpListElem != NULL) {
         psPeak *tmpPeak = (psPeak *) tmpListElem->data;
Index: /trunk/psModules/src/pmObjects.h
===================================================================
--- /trunk/psModules/src/pmObjects.h	(revision 3624)
+++ /trunk/psModules/src/pmObjects.h	(revision 3625)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-31 23:45:22 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-01 20:47:40 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -110,5 +110,5 @@
 
 /******************************************************************************
-pmFindVectorPeeks(vector, threshold): Find all local peaks in the given vector
+pmFindVectorPeaks(vector, threshold): Find all local peaks in the given vector
 above the given threshold.  Returns a vector of type PS_TYPE_U32 containing
 the location (x value) of all peaks.
@@ -119,5 +119,5 @@
 
 /******************************************************************************
-pmFindImagePeeks(image, threshold): Find all local peaks in the given psImage
+pmFindImagePeaks(image, threshold): Find all local peaks in the given psImage
 above the given threshold.  Returns a psList containing the location (x/y
 value) of all peaks.
Index: /trunk/psModules/test/tst_pmObjects01.c
===================================================================
--- /trunk/psModules/test/tst_pmObjects01.c	(revision 3624)
+++ /trunk/psModules/test/tst_pmObjects01.c	(revision 3625)
@@ -19,6 +19,6 @@
  * abd never deallocate, no error is generated.
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-31 00:22:49 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-01 20:47:40 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -63,4 +63,5 @@
 {
     return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
+    test02();
 }
 
@@ -153,5 +154,5 @@
 
 #define VECTOR_SIZE 10
-bool test_pmFindVectorPeeks(int n)
+bool test_pmFindVectorPeaks(int n)
 {
     bool testStatus = true;
@@ -159,9 +160,9 @@
     psVector *outData = NULL;
 
-    printf("-------------- Calling test_pmFindVectorPeeks on an %d size vector. --------------\n", n);
+    printf("-------------- Calling test_pmFindVectorPeaks on an %d size vector. --------------\n", n);
     //
     // Test first pixel peak.
     //
-    printf("Test pmFindVectorPeeks() with a first-element peak.\n");
+    printf("Test pmFindVectorPeaks() with a first-element peak.\n");
     for (psS32 i = 0 ; i < n ; i++) {
         inData->data.F32[i] = (float) (n-i);
@@ -169,7 +170,7 @@
     inData->data.F32[0] = (float) n;
 
-    outData= pmFindVectorPeeks(inData, 0.0);
+    outData= pmFindVectorPeaks(inData, 0.0);
     if (outData == NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks returned a NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks returned a NULL psVector.\n");
         testStatus = false;
     } else {
@@ -189,5 +190,5 @@
     // Test first pixel peak, large threshold
     //
-    printf("Test pmFindVectorPeeks() with a first-element peak, large threshold.\n");
+    printf("Test pmFindVectorPeaks() with a first-element peak, large threshold.\n");
     for (psS32 i = 0 ; i < n ; i++) {
         inData->data.F32[i] = (float) (n-i);
@@ -195,7 +196,7 @@
     inData->data.F32[0] = (float) n;
 
-    outData= pmFindVectorPeeks(inData, (float) (n*n));
+    outData= pmFindVectorPeaks(inData, (float) (n*n));
     if (outData == NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks returned a NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks returned a NULL psVector.\n");
         testStatus = false;
     } else {
@@ -217,5 +218,5 @@
     // Test last pixel peak.
     //
-    printf("Test pmFindVectorPeeks() with a last-element peak.\n");
+    printf("Test pmFindVectorPeaks() with a last-element peak.\n");
     for (psS32 i = 0 ; i < n ; i++) {
         inData->data.F32[i] = (float) (i);
@@ -223,7 +224,7 @@
     inData->data.F32[n-1] = (float) n;
 
-    outData= pmFindVectorPeeks(inData, 0.0);
+    outData= pmFindVectorPeaks(inData, 0.0);
     if (outData == NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks returned a NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks returned a NULL psVector.\n");
         testStatus = false;
     } else {
@@ -243,5 +244,5 @@
     // Test last pixel peak, large threshold.
     //
-    printf("Test pmFindVectorPeeks() with a last-element peak, large threshold.\n");
+    printf("Test pmFindVectorPeaks() with a last-element peak, large threshold.\n");
     for (psS32 i = 0 ; i < n ; i++) {
         inData->data.F32[i] = (float) (i);
@@ -249,7 +250,7 @@
     inData->data.F32[n-1] = (float) n;
 
-    outData= pmFindVectorPeeks(inData, (float) (n*n));
+    outData= pmFindVectorPeaks(inData, (float) (n*n));
     if (outData == NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks returned a NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks returned a NULL psVector.\n");
         testStatus = false;
     } else {
@@ -266,5 +267,5 @@
     // Set all even number elements to be peaks.
     //
-    printf("Test pmFindVectorPeeks() with all even-numbered elements peak.\n");
+    printf("Test pmFindVectorPeaks() with all even-numbered elements peak.\n");
     for (psS32 i = 0 ; i < n ; i++) {
         if (0 == i%2) {
@@ -277,7 +278,7 @@
 
 
-    outData= pmFindVectorPeeks(inData, 0.0);
+    outData= pmFindVectorPeaks(inData, 0.0);
     if (outData == NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks returned a NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks returned a NULL psVector.\n");
         testStatus = false;
     } else {
@@ -301,8 +302,8 @@
     // Should generate an empty output psVector.
     //
-    printf("Test pmFindVectorPeeks() with all even-numbered elements peak, large threshold.\n");
-    outData= pmFindVectorPeeks(inData, (float) (n*n));
+    printf("Test pmFindVectorPeaks() with all even-numbered elements peak, large threshold.\n");
+    outData= pmFindVectorPeaks(inData, (float) (n*n));
     if (outData == NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks returned a NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks returned a NULL psVector.\n");
         testStatus = false;
     } else {
@@ -331,8 +332,8 @@
 
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmFindVectorPeeks with NULL psVector.  Should generate error and return NULL.\n");
-    tmpVec = pmFindVectorPeeks(NULL, 0.0);
+    printf("Calling pmFindVectorPeaks with NULL psVector.  Should generate error and return NULL.\n");
+    tmpVec = pmFindVectorPeaks(NULL, 0.0);
     if (tmpVec != NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks() returned a non-NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks() returned a non-NULL psVector.\n");
         testStatus = false;
         psFree(tmpVec);
@@ -340,8 +341,8 @@
 
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmFindVectorPeeks with empty psVector.  Should generate error and return NULL.\n");
-    tmpVec = pmFindVectorPeeks(tmpVecEmpty, 0.0);
+    printf("Calling pmFindVectorPeaks with empty psVector.  Should generate error and return NULL.\n");
+    tmpVec = pmFindVectorPeaks(tmpVecEmpty, 0.0);
     if (tmpVec != NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks() returned a non-NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks() returned a non-NULL psVector.\n");
         testStatus = false;
         psFree(tmpVec);
@@ -349,13 +350,13 @@
 
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmFindVectorPeeks with PS_TYPE_F64 psVector.  Should generate error and return NULL.\n");
-    tmpVec = pmFindVectorPeeks(tmpVecF64, 0.0);
+    printf("Calling pmFindVectorPeaks with PS_TYPE_F64 psVector.  Should generate error and return NULL.\n");
+    tmpVec = pmFindVectorPeaks(tmpVecF64, 0.0);
     if (tmpVec != NULL) {
-        printf("TEST ERROR: pmFindVectorPeeks() returned a non-NULL psVector.\n");
+        printf("TEST ERROR: pmFindVectorPeaks() returned a non-NULL psVector.\n");
         testStatus = false;
         psFree(tmpVec);
     }
-    testStatus&= test_pmFindVectorPeeks(1);
-    testStatus&= test_pmFindVectorPeeks(VECTOR_SIZE);
+    testStatus&= test_pmFindVectorPeaks(1);
+    testStatus&= test_pmFindVectorPeaks(VECTOR_SIZE);
 
     psFree(tmpVecF64);
@@ -366,7 +367,7 @@
 // XXX: Add tests for the PEAK_TYPE.
 // XXX: Add interior peaks, edge peaks, and flat peaks.
-bool test_pmFindImagePeeks(int numRows, int numCols)
+bool test_pmFindImagePeaks(int numRows, int numCols)
 {
-    printf("-------------- Calling test_pmFindVectorPeeks on an %d-by-%d image. --------------\n", numRows, numCols);
+    printf("-------------- Calling test_pmFindVectorPeaks on an %d-by-%d image. --------------\n", numRows, numCols);
     bool testStatus = true;
     psImage *inData = psImageAlloc(numCols, numRows, PS_TYPE_F32);
@@ -392,15 +393,16 @@
     }
 
-    outData = pmFindImagePeeks(inData, 0.0);
+    outData = pmFindImagePeaks(inData, 0.0);
 
     if (outData == NULL) {
-        printf("TEST ERROR: pmFindImagePeeks returned a NULL psList.\n");
+        printf("TEST ERROR: pmFindImagePeaks returned a NULL psList.\n");
         testStatus = false;
     } else {
         if (outData->size != 4) {
-            printf("TEST ERROR: pmFindImagePeeks found only %d peaks (should be 4)\n", outData->size);
+            printf("TEST ERROR: pmFindImagePeaks found only %d peaks (should be 4)\n", outData->size);
             testStatus = false;
         }
 
+        //HEY
         psListElem *tmpPeakLE = (psListElem *) outData->head;
         while (tmpPeakLE != NULL) {
@@ -409,5 +411,5 @@
                 ((tmpPeak->y == 0) || (tmpPeak->y == numCols-1))) {}
             else {
-                printf("TEST ERROR: Peak at (%d, %d)\n", tmpPeak->x, tmpPeak->y);
+                printf("TEST ERROR: Peak at (%d, %d) (%f)\n", tmpPeak->x, tmpPeak->y, tmpPeak->counts);
                 testStatus = false;
             }
@@ -432,8 +434,8 @@
 
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmFindImagePeeks with NULL psImage.  Should generate error and return NULL.\n");
-    tmpList = pmFindImagePeeks(NULL, 0.0);
+    printf("Calling pmFindImagePeaks with NULL psImage.  Should generate error and return NULL.\n");
+    tmpList = pmFindImagePeaks(NULL, 0.0);
     if (tmpList != NULL) {
-        printf("TEST ERROR: pmFindImagePeeks() returned a non-NULL psImage.\n");
+        printf("TEST ERROR: pmFindImagePeaks() returned a non-NULL psImage.\n");
         testStatus = false;
         psFree(tmpList);
@@ -441,8 +443,8 @@
 
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmFindImagePeeks with empty psImage.  Should generate error and return NULL.\n");
-    tmpList = pmFindImagePeeks(tmpImageEmpty, 0.0);
+    printf("Calling pmFindImagePeaks with empty psImage.  Should generate error and return NULL.\n");
+    tmpList = pmFindImagePeaks(tmpImageEmpty, 0.0);
     if (tmpList != NULL) {
-        printf("TEST ERROR: pmFindImagePeeks() returned a non-NULL psImage.\n");
+        printf("TEST ERROR: pmFindImagePeaks() returned a non-NULL psImage.\n");
         testStatus = false;
         psFree(tmpList);
@@ -450,16 +452,16 @@
 
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmFindImagePeeks with PS_TYPE_F64 psImage.  Should generate error and return NULL.\n");
-    tmpList = pmFindImagePeeks(tmpImageF64, 0.0);
+    printf("Calling pmFindImagePeaks with PS_TYPE_F64 psImage.  Should generate error and return NULL.\n");
+    tmpList = pmFindImagePeaks(tmpImageF64, 0.0);
     if (tmpList != NULL) {
-        printf("TEST ERROR: pmFindImagePeeks() returned a non-NULL psImage.\n");
+        printf("TEST ERROR: pmFindImagePeaks() returned a non-NULL psImage.\n");
         testStatus = false;
         psFree(tmpList);
     }
     printf("----------------------------------------------------------------------------------\n");
-    //    testStatus&= test_pmFindImagePeeks(1, 1);
-    //    testStatus&= test_pmFindImagePeeks(2, 5);
-    //    testStatus&= test_pmFindImagePeeks(5, 2);
-    testStatus&= test_pmFindImagePeeks(10, 10);
+    //    testStatus&= test_pmFindImagePeaks(1, 1);
+    //    testStatus&= test_pmFindImagePeaks(2, 5);
+    //    testStatus&= test_pmFindImagePeaks(5, 2);
+    testStatus&= test_pmFindImagePeaks(10, 10);
 
 
@@ -470,6 +472,6 @@
 
 /******************************************************************************
-test03(): We first test pmCullPeeks() with various NULL and unallowable input
-parameters.  Then we generate a list of peaks and test that pmCullPeeks()
+test03(): We first test pmCullPeaks() with various NULL and unallowable input
+parameters.  Then we generate a list of peaks and test that pmCullPeaks()
 removes them correctly.
  *****************************************************************************/
@@ -481,8 +483,8 @@
 
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmCullPeeks with NULL psList.  Should generate error and return NULL.\n");
-    outData = pmCullPeeks(NULL, 0.0, NULL);
+    printf("Calling pmCullPeaks with NULL psList.  Should generate error and return NULL.\n");
+    outData = pmCullPeaks(NULL, 0.0, NULL);
     if (outData != NULL) {
-        printf("TEST ERROR: pmCulPeeks() returned a non-NULL psList.\n");
+        printf("TEST ERROR: pmCulPeaks() returned a non-NULL psList.\n");
         testStatus = false;
     }
@@ -512,20 +514,20 @@
 
     //
-    // Call pmCullPeeks() with HUGE maxValue and NULL psRegion.  Should not
+    // Call pmCullPeaks() with HUGE maxValue and NULL psRegion.  Should not
     // remove any peaks.
     //
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmCullPeeks with large maxValue and NULL psRegion.\n");
-    outData = pmFindImagePeeks(imgData, 0.0);
-    outData = pmCullPeeks(outData, PS_MAX_F32, NULL);
+    printf("Calling pmCullPeaks with large maxValue and NULL psRegion.\n");
+    outData = pmFindImagePeaks(imgData, 0.0);
+    outData = pmCullPeaks(outData, PS_MAX_F32, NULL);
 
     if (outData == NULL) {
-        printf("TEST ERROR: pmCullPeeks() returned a non-NULL psList.\n");
+        printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
         testStatus = false;
         return(testStatus);
     }
     if (outData->size != numPeaksOrig) {
-        printf("TEST ERROR (0): pmCullPeeks incorrectly removed peaks\n");
-        printf("The pmCullPeeks() output had %d peaks, should have had %d peaks.\n", outData->size, numPeaksOrig);
+        printf("TEST ERROR (0): pmCullPeaks incorrectly removed peaks\n");
+        printf("The pmCullPeaks() output had %d peaks, should have had %d peaks.\n", outData->size, numPeaksOrig);
         testStatus = false;
     }
@@ -533,21 +535,21 @@
 
     //
-    // Call pmCullPeeks() with TINY maxValue and NULL psRegion.  Should
+    // Call pmCullPeaks() with TINY maxValue and NULL psRegion.  Should
     // remove all peaks.
     //
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmCullPeeks with tiny maxValue and NULL psRegion.\n");
-    outData = pmFindImagePeeks(imgData, 0.0);
-    printf("pmFindImagePeeks found %d peaks\n", outData->size);
-    outData = pmCullPeeks(outData, 0.0, NULL);
+    printf("Calling pmCullPeaks with tiny maxValue and NULL psRegion.\n");
+    outData = pmFindImagePeaks(imgData, 0.0);
+    printf("pmFindImagePeaks found %d peaks\n", outData->size);
+    outData = pmCullPeaks(outData, 0.0, NULL);
 
     if (outData == NULL) {
-        printf("TEST ERROR: pmCullPeeks() returned a non-NULL psList.\n");
+        printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
         testStatus = false;
         return(testStatus);
     }
     if (outData->size != 0) {
-        printf("TEST ERROR (1): pmCullPeeks incorrectly removed peaks\n");
-        printf("The pmCullPeeks() output had %d peaks, should have had %d peaks.\n", outData->size, 0);
+        printf("TEST ERROR (1): pmCullPeaks incorrectly removed peaks\n");
+        printf("The pmCullPeaks() output had %d peaks, should have had %d peaks.\n", outData->size, 0);
         testStatus = false;
     }
@@ -555,22 +557,22 @@
 
     //
-    // Call pmCullPeeks() with HUGE maxValue and disjoint psRegion.  Should
+    // Call pmCullPeaks() with HUGE maxValue and disjoint psRegion.  Should
     // not remove any peaks.
     //
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmCullPeeks with large maxValue and disjoint psRegion.\n");
-    outData = pmFindImagePeeks(imgData, 0.0);
-    printf("pmFindImagePeeks found %d peaks\n", outData->size);
+    printf("Calling pmCullPeaks with large maxValue and disjoint psRegion.\n");
+    outData = pmFindImagePeaks(imgData, 0.0);
+    printf("pmFindImagePeaks found %d peaks\n", outData->size);
     psRegion *tmpRegion = psRegionAlloc(10000.0, 20000.0, 10000.0, 20000.0);
-    outData = pmCullPeeks(outData, PS_MAX_F32, tmpRegion);
+    outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion);
 
     if (outData == NULL) {
-        printf("TEST ERROR: pmCullPeeks() returned a non-NULL psList.\n");
+        printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
         testStatus = false;
         return(testStatus);
     }
     if (outData->size != numPeaksOrig) {
-        printf("TEST ERROR (2): pmCullPeeks incorrectly removed peaks\n");
-        printf("The pmCullPeeks() output had %d peaks, should have had %d peaks.\n", outData->size, numPeaksOrig);
+        printf("TEST ERROR (2): pmCullPeaks incorrectly removed peaks\n");
+        printf("The pmCullPeaks() output had %d peaks, should have had %d peaks.\n", outData->size, numPeaksOrig);
         testStatus = false;
     }
@@ -579,22 +581,22 @@
 
     //
-    // Call pmCullPeeks() with HUGE maxValue and non-disjoint psRegion.  Should
+    // Call pmCullPeaks() with HUGE maxValue and non-disjoint psRegion.  Should
     // remove all peaks.
     //
     printf("----------------------------------------------------------------------------------\n");
-    printf("Calling pmCullPeeks with large maxValue and non-disjoint psRegion.\n");
-    outData = pmFindImagePeeks(imgData, 0.0);
-    printf("pmFindImagePeeks found %d peaks\n", outData->size);
+    printf("Calling pmCullPeaks with large maxValue and non-disjoint psRegion.\n");
+    outData = pmFindImagePeaks(imgData, 0.0);
+    printf("pmFindImagePeaks found %d peaks\n", outData->size);
     tmpRegion = psRegionAlloc(-PS_MAX_F32, PS_MAX_F32, -PS_MAX_F32, PS_MAX_F32);
-    outData = pmCullPeeks(outData, PS_MAX_F32, tmpRegion);
+    outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion);
 
     if (outData == NULL) {
-        printf("TEST ERROR: pmCullPeeks() returned a non-NULL psList.\n");
+        printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
         testStatus = false;
         return(testStatus);
     }
     if (outData->size != 0) {
-        printf("TEST ERROR (3): pmCullPeeks incorrectly removed peaks\n");
-        printf("The pmCullPeeks() output had %d peaks, should have had %d peaks.\n", outData->size, 0);
+        printf("TEST ERROR (3): pmCullPeaks incorrectly removed peaks\n");
+        printf("The pmCullPeaks() output had %d peaks, should have had %d peaks.\n", outData->size, 0);
         testStatus = false;
     }
