Index: /trunk/psLib/src/image/psImagePixelExtract.c
===================================================================
--- /trunk/psLib/src/image/psImagePixelExtract.c	(revision 4205)
+++ /trunk/psLib/src/image/psImagePixelExtract.c	(revision 4206)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-05-19 02:08:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 02:30:47 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -28,8 +28,5 @@
                        const psImage* restrict mask,
                        psU32 maskVal,
-                       psS32 col0,
-                       psS32 row0,
-                       psS32 col1,
-                       psS32 row1,
+                       psRegion region,
                        psImageCutDirection direction,
                        const psStats* stats)
@@ -42,4 +39,8 @@
     psS32 delta = 1;
     psF64* outData;
+    psS32 row0 = region.y0;
+    psS32 row1 = region.y1;
+    psS32 col0 = region.x0;
+    psS32 col1 = region.x1;
 
     if (in == NULL || in->data.V == NULL) {
@@ -271,13 +272,11 @@
                      psVector* cutRows,
                      const psImage* in,
-                     const psImage* restrict mask,
+                     const psImage* mask,
                      psU32 maskVal,
-                     float startCol,
-                     float startRow,
-                     float endCol,
-                     float endRow,
+                     psRegion region,
                      psU32 nSamples,
                      psImageInterpolateMode mode)
 {
+
     if (in == NULL || in->data.V == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
@@ -297,4 +296,8 @@
     }
 
+    float startCol = region.x0;
+    float startRow = region.y0;
+    float endCol = region.x1;
+    float endRow = region.y1;
     if (startCol < 0 || startCol >= numCols ||
             startRow < 0 || startRow >= numRows ||
Index: /trunk/psLib/src/image/psImagePixelExtract.h
===================================================================
--- /trunk/psLib/src/image/psImagePixelExtract.h	(revision 4205)
+++ /trunk/psLib/src/image/psImagePixelExtract.h	(revision 4206)
@@ -8,6 +8,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-08 23:40:45 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-10 02:30:47 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -65,8 +65,5 @@
     const psImage* mask,               ///< the mask for the input image.
     psU32 maskVal,                     ///< the mask value to apply to the mask
-    psS32 col0,                        ///< the leftmost column of the slice region
-    psS32 row0,                        ///< the bottommost row of the slice region
-    psS32 col1,                        ///< exclusive end column of the slice region
-    psS32 row1,                        ///< exclusive end row of the slice region
+    psRegion region,                   ///< the slice region
     psImageCutDirection direction,     ///< the slice dimension and direction
     const psStats* stats               ///< the statistic to perform in slice operation
@@ -96,8 +93,5 @@
     const psImage* mask,               ///< the mask for the input image.
     psU32 maskVal,                     ///< the mask value to apply to the mask
-    float startCol,                    ///< the column of the start of the cut line
-    float startRow,                    ///< the row of the start of the cut line
-    float endCol,                      ///< the column of the end of the cut line
-    float endRow,                      ///< the row of the end of the cut line
+    psRegion region,                   ///< the start and end points to cut along
     psU32 nSamples,                    ///< the number of samples along the cut
     psImageInterpolateMode mode        ///< the interpolation method to use
Index: /trunk/psLib/src/imageops/psImagePixelExtract.c
===================================================================
--- /trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 4205)
+++ /trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 4206)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-05-19 02:08:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 02:30:47 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -28,8 +28,5 @@
                        const psImage* restrict mask,
                        psU32 maskVal,
-                       psS32 col0,
-                       psS32 row0,
-                       psS32 col1,
-                       psS32 row1,
+                       psRegion region,
                        psImageCutDirection direction,
                        const psStats* stats)
@@ -42,4 +39,8 @@
     psS32 delta = 1;
     psF64* outData;
+    psS32 row0 = region.y0;
+    psS32 row1 = region.y1;
+    psS32 col0 = region.x0;
+    psS32 col1 = region.x1;
 
     if (in == NULL || in->data.V == NULL) {
@@ -271,13 +272,11 @@
                      psVector* cutRows,
                      const psImage* in,
-                     const psImage* restrict mask,
+                     const psImage* mask,
                      psU32 maskVal,
-                     float startCol,
-                     float startRow,
-                     float endCol,
-                     float endRow,
+                     psRegion region,
                      psU32 nSamples,
                      psImageInterpolateMode mode)
 {
+
     if (in == NULL || in->data.V == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
@@ -297,4 +296,8 @@
     }
 
+    float startCol = region.x0;
+    float startRow = region.y0;
+    float endCol = region.x1;
+    float endRow = region.y1;
     if (startCol < 0 || startCol >= numCols ||
             startRow < 0 || startRow >= numRows ||
Index: /trunk/psLib/src/imageops/psImagePixelExtract.h
===================================================================
--- /trunk/psLib/src/imageops/psImagePixelExtract.h	(revision 4205)
+++ /trunk/psLib/src/imageops/psImagePixelExtract.h	(revision 4206)
@@ -8,6 +8,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-08 23:40:45 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-10 02:30:47 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -65,8 +65,5 @@
     const psImage* mask,               ///< the mask for the input image.
     psU32 maskVal,                     ///< the mask value to apply to the mask
-    psS32 col0,                        ///< the leftmost column of the slice region
-    psS32 row0,                        ///< the bottommost row of the slice region
-    psS32 col1,                        ///< exclusive end column of the slice region
-    psS32 row1,                        ///< exclusive end row of the slice region
+    psRegion region,                   ///< the slice region
     psImageCutDirection direction,     ///< the slice dimension and direction
     const psStats* stats               ///< the statistic to perform in slice operation
@@ -96,8 +93,5 @@
     const psImage* mask,               ///< the mask for the input image.
     psU32 maskVal,                     ///< the mask value to apply to the mask
-    float startCol,                    ///< the column of the start of the cut line
-    float startRow,                    ///< the row of the start of the cut line
-    float endCol,                      ///< the column of the end of the cut line
-    float endRow,                      ///< the row of the end of the cut line
+    psRegion region,                   ///< the start and end points to cut along
     psU32 nSamples,                    ///< the number of samples along the cut
     psImageInterpolateMode mode        ///< the interpolation method to use
Index: /trunk/psLib/test/image/tst_psImagePixelExtract.c
===================================================================
--- /trunk/psLib/test/image/tst_psImagePixelExtract.c	(revision 4205)
+++ /trunk/psLib/test/image/tst_psImagePixelExtract.c	(revision 4206)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-05-19 02:49:40 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-10 02:30:47 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -77,5 +77,5 @@
         } \
     } \
-    out = psImageSlice(out,positions,image,mask,1,c/10,r/10,c/10+M,r/10+N,DIRECTION,stat); \
+    out = psImageSlice(out,positions,image,mask,1,psRegionSet(c/10,c/10+M,r/10,r/10+N),DIRECTION,stat); \
     \
     if (out->n != TRUTH_SIZE) { \
@@ -153,6 +153,5 @@
                         NULL, NULL,
                         NULL, 0,
-                        c/10, r/10,
-                        c/10 + 1, r/10 + 1,
+                        psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1),
                         PS_CUT_X_POS,
                         stat );
@@ -171,7 +170,5 @@
                         NULL, image,
                         mask, 1,
-                        c/10, r/10,
-                        c/10 + 1,
-                        r/10 + 1,
+                        psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1),
                         PS_CUT_X_POS,
                         NULL );
@@ -190,6 +187,5 @@
                         image,
                         mask, 1,
-                        c/10, r/10,
-                        c/10+1, r/10+1,
+                        psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1),
                         5,
                         stat);
@@ -208,6 +204,5 @@
                         image,
                         mask, 1,
-                        c/10, r/10,
-                        c/10, r/10,
+                        psRegionSet(c/10, c/10, r/10, r/10),
                         PS_CUT_X_POS,
                         stat );
@@ -226,6 +221,5 @@
                         image,
                         mask, 1,
-                        c+1, r/10,
-                        c+2, r/10+10,
+                        psRegionSet(c+1, c+2, r/10, r/10 + 10),
                         PS_CUT_X_POS,
                         stat );
@@ -239,6 +233,5 @@
                         image,
                         mask, 1,
-                        c/10, r+1,
-                        c/10+1,r+5,
+                        psRegionSet(c/10, c/10 + 1, r+1,r+5),
                         PS_CUT_X_POS,
                         stat );
@@ -252,6 +245,5 @@
                         image,
                         mask, 1,
-                        c/10, r/10,
-                        c+1, r/10+1,
+                        psRegionSet(c/10, c+1, r/10, r/10+1),
                         PS_CUT_X_POS,
                         stat);
@@ -265,6 +257,5 @@
                         image,
                         mask, 1,
-                        c/10, r/10,
-                        c/10+1, r + 1,
+                        psRegionSet(c/10, c/10 + 1, r/10, r + 1),
                         PS_CUT_X_POS,
                         stat);
@@ -284,6 +275,5 @@
                         image,
                         mask, 1,
-                        c/10, r/10,
-                        c/10+1, r/10+1,
+                        psRegionSet(c/10, c/10 + 1, r/10, r/10+1),
                         PS_CUT_X_POS,
                         stat);
@@ -302,6 +292,5 @@
                         image,
                         maskSz, 1,
-                        c/10, r/10,
-                        c/10+1, r/10+1,
+                        psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1),
                         PS_CUT_X_POS,
                         stat);
@@ -318,6 +307,5 @@
                          image,
                          maskS8, 1,
-                         c/10, r/10,
-                         c/10+1, r/10+1,
+                         psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1),
                          PS_CUT_X_POS,
                          stat);
@@ -377,6 +365,5 @@
                                 image,
                                 NULL,0,
-                                startCol[n], startRow[n],
-                                endCol[n], endRow[n],
+                                psRegionSet(startCol[n], endCol[n], startRow[n],endRow[n]),
                                 length,
                                 PS_INTERPOLATE_FLAT);
@@ -386,6 +373,5 @@
                                 image,
                                 mask,1,
-                                startCol[n], startRow[n],
-                                endCol[n], endRow[n],
+                                psRegionSet(startCol[n], endCol[n], startRow[n], endRow[n]),
                                 length,
                                 PS_INTERPOLATE_FLAT);
@@ -454,6 +440,5 @@
                         NULL,
                         mask,1,
-                        startCol[0], startRow[0],
-                        endCol[0], endRow[0],
+                        psRegionSet(startCol[0], endCol[0], startRow[0], endRow[0]),
                         length,
                         PS_INTERPOLATE_FLAT);
@@ -476,6 +461,5 @@
                         image,
                         mask,1,
-                        startCol[0], startRow[0],
-                        endCol[0], endRow[0],
+                        psRegionSet(startCol[0], endCol[0], startRow[0], endRow[0]),
                         0,
                         PS_INTERPOLATE_FLAT);
