Index: trunk/psLib/test/imageops/tap_psImagePixelExtract.c
===================================================================
--- trunk/psLib/test/imageops/tap_psImagePixelExtract.c	(revision 12257)
+++ trunk/psLib/test/imageops/tap_psImagePixelExtract.c	(revision 13042)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-03-06 03:14:01 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2007-04-26 22:18:03 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -66,6 +66,6 @@
                 } \
             } \
-            image->col0 = 1; \
-            image->row0 = 1; \
+            P_PSIMAGE_SET_COL0(image, 1); \
+            P_PSIMAGE_SET_ROW0(image, 1); \
             out = psImageSlice(out,positions,image,mask,1, \
                                psRegionSet(1+c/10,1+c/10+M,1+r/10,1+r/10+N),DIRECTION,stat); \
@@ -284,6 +284,6 @@
             }
         }
-        image->col0 = 1;
-        image->row0 = 1;
+        P_PSIMAGE_SET_COL0(image, 1);
+        P_PSIMAGE_SET_ROW0(image, 1);
         psFree(out);
         out = NULL;
@@ -295,5 +295,5 @@
 
         //Return NULL for incorrect image inputs.
-        image->row0 = -1;
+        P_PSIMAGE_SET_ROW0(image, -1);
         // Following should generate error message
         // XXX: Verify error
@@ -302,6 +302,6 @@
         ok(out == NULL, "psImageSlice returned NULL for unallowed specified input");
 
-        image->col0 = -1;
-        image->row0 = 1;
+        P_PSIMAGE_SET_COL0(image, -1);
+        P_PSIMAGE_SET_ROW0(image, 1);
         // Following should generate error message
         // XXX: Verify error
@@ -310,5 +310,5 @@
         ok(out == NULL, "psImageSlice returned NULL for unallowed specified input");
 
-        image->col0 = 1;
+        P_PSIMAGE_SET_COL0(image, -1);
         // Return NULL for incorrect region inputs.
         // Following should generate error message
@@ -426,4 +426,11 @@
                 ok(orig != NULL, "orig image is non-NULL");
                 ok(orig == result, "psImageCut did recycle the out parameter properly");
+                psImageInterpolateOptions *tmpIntOptsNoMask = psImageInterpolateOptionsAlloc(
+                    PS_INTERPOLATE_FLAT, image, NULL, NULL, 0, 0, NAN, 0, 0, 0.0);
+                psImageInterpolateOptions *tmpIntOptsMask = psImageInterpolateOptionsAlloc(
+                    PS_INTERPOLATE_FLAT, image, NULL, NULL, 1, 0, NAN, 0, 0, 0.0);
+                double imgVal;
+                double varVal;
+                psMaskType maskVal;
     
                 float deltaRow = (endRow[n]-startRow[n])/(length-1);
@@ -434,9 +441,13 @@
                     float y = (float)startRow[n]+(float)i*deltaRow;
                     if (n == 1) {
-                        truth = psImagePixelInterpolate( image, x, y,
-                                                         NULL,0,0,PS_INTERPOLATE_FLAT);
+//                        truth = psImagePixelInterpolate( image, x, y,
+//                                                         NULL,0,0,PS_INTERPOLATE_FLAT);
+                          psImageInterpolate(&imgVal, &varVal, &maskVal, x, y, tmpIntOptsNoMask);
+                          truth = imgVal;
                     } else {
-                        truth = psImagePixelInterpolate( image, x, y,
-                                                         mask,1,0,PS_INTERPOLATE_FLAT);
+//                        truth = psImagePixelInterpolate( image, x, y,
+//                                                         mask,1,0,PS_INTERPOLATE_FLAT);
+                          psImageInterpolate(&imgVal, &varVal, &maskVal, x, y, tmpIntOptsMask);
+                          truth = imgVal;
                     }
                     if (fabs(result->data.F32[i]-truth) > FLT_EPSILON) {
@@ -452,4 +463,6 @@
                     }
                 }
+                psFree(tmpIntOptsNoMask);
+                psFree(tmpIntOptsMask);
             } else {
                 if (result != NULL) {
@@ -720,6 +733,6 @@
     
         //Test for unallowed col0.
-        *(psS32*)&(image->row0) = 5;
-        *(psS32*)&(image->col0) = -1;
+        P_PSIMAGE_SET_COL0(image, -1);
+        P_PSIMAGE_SET_ROW0(image, 5);
         // Following should generate error message(for row)
         // XXX: Verify error
@@ -733,5 +746,5 @@
     
         //Test for unallowed numRows
-        *(psS32*)&(image->col0) = 10;
+        P_PSIMAGE_SET_COL0(image, 10);
         *(int*)&(image->numRows) = -1;
         // Following should generate error message(for row)
@@ -797,6 +810,6 @@
     
         //Test valid cases.
-        image->col0 = 10;
-        image->row0 = 5;
+        P_PSIMAGE_SET_COL0(image, 10);
+        P_PSIMAGE_SET_ROW0(image, 5);
         *(int*)&(image->numRows) = 3;
         *(int*)&(image->numCols) = 3;
