Index: trunk/psLib/src/imageops/psImagePixelExtract.c
===================================================================
--- trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 6294)
+++ trunk/psLib/src/imageops/psImagePixelExtract.c	(revision 6484)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-02-02 04:41:42 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-02-24 23:43:15 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -326,4 +326,5 @@
         // psStats.
         out = psVectorRecycle(out, numCols, PS_TYPE_F64);
+        out->n = numCols;
         if (coords != NULL) {
             coords = psPixelsRealloc(coords, numCols);
@@ -342,4 +343,6 @@
             maskVec = psVectorAlloc(numRows, mask->type.type);
         }
+        imgVec->n = imgVec->nalloc;
+        maskVec->n = maskVec->nalloc;
         #define PSIMAGE_CUT_VERTICAL(TYPE) \
     case PS_TYPE_##TYPE: { \
@@ -408,12 +411,9 @@
         imgVec = psAlloc(sizeof(psVector));
         imgVec->type = input->type;
-
         P_PSVECTOR_SET_NALLOC(imgVec,numCols);
-        imgVec->n = numCols;
         if (mask != NULL) {
             maskVec = psAlloc(sizeof(psVector));
             maskVec->type = mask->type;
             P_PSVECTOR_SET_NALLOC(maskVec,numCols);
-            maskVec->n = numCols;
         }
         // recycle output to make a proper sized/type output structure
@@ -421,4 +421,7 @@
         // psStats.
         out = psVectorRecycle(out, numRows, PS_TYPE_F64);
+        out->n = numRows;
+        imgVec->n = imgVec->nalloc;
+        maskVec->n = maskVec->nalloc;
         if (coords != NULL) {
             coords = psPixelsRealloc(coords, numRows);
