Index: trunk/psLib/src/imageops/psImagePixelExtract.c
===================================================================
--- trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 4206)
+++ trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 4367)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-10 02:30:47 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-23 03:50:29 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -24,6 +24,6 @@
 
 psVector* psImageSlice(psVector* out,
-                       psVector* slicePositions,
-                       const psImage* restrict in,
+                       psVector* coords,
+                       const psImage* restrict input,
                        const psImage* restrict mask,
                        psU32 maskVal,
@@ -44,5 +44,5 @@
     psS32 col1 = region.x1;
 
-    if (in == NULL || in->data.V == NULL) {
+    if (input == NULL || input->data.V == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 PS_ERRORTEXT_psImage_IMAGE_NULL);
@@ -52,15 +52,15 @@
 
     if (col1 < 1) {
-        col1 += in->numCols;
+        col1 += input->numCols;
     }
 
     if (row1 < 1) {
-        row1 += in->numRows;
+        row1 += input->numRows;
     }
 
     if (    col0 < 0 ||
             row0 < 0 ||
-            col1 > in->numCols ||
-            row1 > in->numRows ||
+            col1 > input->numCols ||
+            row1 > input->numRows ||
             col0 >= col1 ||
             row0 >= row1) {
@@ -68,12 +68,12 @@
                 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,
                 col0, col1, row0, row1,
-                in->numCols, in->numRows);
-        psFree(out);
-        return NULL;
-    }
-
-    type = in->type.type;
-    inRows = in->numRows;
-    inCols = in->numCols;
+                input->numCols, input->numRows);
+        psFree(out);
+        return NULL;
+    }
+
+    type = input->type.type;
+    inRows = input->numRows;
+    inCols = input->numCols;
 
     if (direction == PS_CUT_X_NEG || direction == PS_CUT_Y_NEG) {
@@ -134,7 +134,7 @@
         // psStats.
         out = psVectorRecycle(out, numCols, PS_TYPE_F64);
-        if (slicePositions != NULL) {
-            slicePositions = psVectorRecycle(slicePositions, numCols, PS_TYPE_U32);
-            outPosition = slicePositions->data.U32;
+        if (coords != NULL) {
+            coords = psVectorRecycle(coords, numCols, PS_TYPE_U32);
+            outPosition = coords->data.U32;
         }
         outData = out->data.F64;
@@ -153,5 +153,5 @@
             psMaskType* maskVecData = NULL; \
             for (psS32 c=col0;c<col1;c++) { \
-                ps##TYPE *imgData = in->data.TYPE[row0] + c; \
+                ps##TYPE *imgData = input->data.TYPE[row0] + c; \
                 ps##TYPE *imgVecData = imgVec->data.TYPE; \
                 if (maskVec != NULL) { \
@@ -213,5 +213,5 @@
         // fill in psVector to fake out the statistics functions.
         imgVec = psAlloc(sizeof(psVector));
-        imgVec->type = in->type;
+        imgVec->type = input->type;
         imgVec->n = *(int*)&imgVec->nalloc = numCols;
         if (mask != NULL) {
@@ -224,7 +224,7 @@
         // psStats.
         out = psVectorRecycle(out, numRows, PS_TYPE_F64);
-        if (slicePositions != NULL) {
-            slicePositions = psVectorRecycle(slicePositions, numRows, PS_TYPE_U32);
-            outPosition = slicePositions->data.U32;
+        if (coords != NULL) {
+            coords = psVectorRecycle(coords, numRows, PS_TYPE_U32);
+            outPosition = coords->data.U32;
         }
         outData = out->data.F64;
@@ -239,5 +239,5 @@
             // point the vector struct to the
             // data to calculate the stats
-            imgVec->data.U8 = (psPtr )(in->data.U8[r] + col0 * elementSize);
+            imgVec->data.U8 = (psPtr )(input->data.U8[r] + col0 * elementSize);
             if (maskVec != NULL) {
                 maskVec->data.U8 = (psPtr )(mask->data.U8[r] + col0 * sizeof(psMaskType));
@@ -271,13 +271,13 @@
                      psVector* cutCols,
                      psVector* cutRows,
-                     const psImage* in,
+                     const psImage* input,
                      const psImage* mask,
                      psU32 maskVal,
                      psRegion region,
-                     psU32 nSamples,
+                     unsigned int nSamples,
                      psImageInterpolateMode mode)
 {
 
-    if (in == NULL || in->data.V == NULL) {
+    if (input == NULL || input->data.V == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 PS_ERRORTEXT_psImage_IMAGE_NULL);
@@ -285,6 +285,6 @@
         return NULL;
     }
-    psS32 numCols = in->numCols;
-    psS32 numRows = in->numRows;
+    psS32 numCols = input->numCols;
+    psS32 numRows = input->numRows;
 
     if (nSamples < 2) {
@@ -352,5 +352,5 @@
     }
 
-    out = psVectorRecycle(out, nSamples, in->type.type);
+    out = psVectorRecycle(out, nSamples, input->type.type);
 
     float dX = (endCol - startCol) / (float)(nSamples-1);
@@ -370,5 +370,5 @@
                 cutRowsData[i] = y; \
             } \
-            outData[i] = psImagePixelInterpolate(in,x,y,mask,maskVal,0,mode); \
+            outData[i] = psImagePixelInterpolate(input,x,y,mask,maskVal,0,mode); \
         } \
     } \
@@ -376,5 +376,5 @@
 
 
-    switch (in->type.type) {
+    switch (input->type.type) {
         LINEAR_CUT_CASE(U8);
         LINEAR_CUT_CASE(U16);
@@ -392,5 +392,5 @@
     default: {
             char* typeStr;
-            PS_TYPE_NAME(typeStr,in->type.type);
+            PS_TYPE_NAME(typeStr,input->type.type);
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
@@ -405,9 +405,9 @@
 
 psVector* psImageRadialCut(psVector* out,
-                           const psImage* in,
+                           const psImage* input,
                            const psImage* restrict mask,
                            psU32 maskVal,
-                           float centerCol,
-                           float centerRow,
+                           float x,
+                           float y,
                            const psVector* radii,
                            const psStats* stats)
@@ -417,5 +417,5 @@
     /* check the parameters */
 
-    if (in == NULL || in->data.V == NULL) {
+    if (input == NULL || input->data.V == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 PS_ERRORTEXT_psImage_IMAGE_NULL);
@@ -423,6 +423,6 @@
         return NULL;
     }
-    psS32 numCols = in->numCols;
-    psS32 numRows = in->numRows;
+    psS32 numCols = input->numCols;
+    psS32 numRows = input->numRows;
 
     if (mask != NULL) {
@@ -446,9 +446,9 @@
     }
 
-    if (centerCol < 0 || centerCol >= numCols ||
-            centerRow < 0 || centerRow >= numRows) {
+    if (x < 0 || x >= numCols ||
+            y < 0 || y >= numRows) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 PS_ERRORTEXT_psImage_CENTER_NOT_IN_IMAGE,
-                centerCol, centerRow,
+                x, y,
                 numCols-1, numRows-1);
         psFree(out);
@@ -498,8 +498,8 @@
     psF32* rSq = rSqVec->data.F32;
 
-    psS32 startRow = centerRow - rSq[numOut];
-    psS32 endRow = centerRow + rSq[numOut];
-    psS32 startCol = centerCol - rSq[numOut];
-    psS32 endCol = centerCol + rSq[numOut];
+    psS32 startRow = y - rSq[numOut];
+    psS32 endRow = y + rSq[numOut];
+    psS32 startCol = x - rSq[numOut];
+    psS32 endCol = x + rSq[numOut];
 
     if (startRow < 0) {
@@ -531,5 +531,5 @@
         // than the area of the region of interest.
         buffer[lcv] = psVectorAlloc(1+4*(rSq[lcv+1]-rSq[lcv]),
-                                    in->type.type);
+                                    input->type.type);
         buffer[lcv]->n = 0;
 
@@ -546,5 +546,5 @@
     float dist;
     for (psS32 row=startRow; row <= endRow; row++) {
-        psF32* inRow = in->data.F32[row];
+        psF32* inRow = input->data.F32[row];
         psMaskType* maskRow = NULL;
         if (mask != NULL) {
@@ -552,6 +552,6 @@
         }
         for (psS32 col=startCol; col <= endCol; col++) {
-            dX = centerCol - (float)col - 0.5f;
-            dY = centerRow - (float)row - 0.5f;
+            dX = x - (float)col - 0.5f;
+            dY = y - (float)row - 0.5f;
             dist = dX*dX+dY*dY;
             for (psS32 r = 0; r < numOut; r++) {
