Index: trunk/psLib/src/imageops/psImagePixelExtract.c
===================================================================
--- trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 8627)
+++ trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 9730)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-26 04:34:28 $
+ *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-10-24 22:52:55 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -18,4 +18,5 @@
 
 #include "psMemory.h"
+#include "psVector.h"
 #include "psImagePixelExtract.h"
 #include "psError.h"
@@ -392,5 +393,4 @@
     if (direction == PS_CUT_X_POS || direction == PS_CUT_X_NEG) {
         psVector* imgVec = psVectorAlloc(numRows, type);
-        imgVec->n = imgVec->nalloc;
         psVector* maskVec = NULL;
         psMaskType* maskData = NULL;
@@ -417,5 +417,4 @@
         if (mask != NULL) {
             maskVec = psVectorAlloc(numRows, mask->type.type);
-            maskVec->n = maskVec->nalloc;
         }
         #define PSIMAGE_CUT_VERTICAL(TYPE) \
@@ -855,13 +854,11 @@
         // n.b. alloc enough for the data by making the vectors slightly larger
         // than the area of the region of interest.
-        buffer[lcv] = psVectorAlloc(1+4*(rSq[lcv+1]-rSq[lcv]),
-                                    input->type.type);
-        buffer[lcv]->n = 0;
+        buffer[lcv] = psVectorAllocEmpty(1+4*(rSq[lcv+1]-rSq[lcv]),
+                                         input->type.type);
 
         bufferMask[lcv] = NULL;
         if (mask != NULL) {
-            bufferMask[lcv] = psVectorAlloc(1+4*(rSq[lcv+1]-rSq[lcv]),
-                                            PS_TYPE_MASK);
-            bufferMask[lcv]->n = 0;
+            bufferMask[lcv] = psVectorAllocEmpty(1+4*(rSq[lcv+1]-rSq[lcv]),
+                                                 PS_TYPE_MASK);
         }
     }
