Index: trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- trunk/doc/pslib/psLibSDRS.tex	(revision 3734)
+++ trunk/doc/pslib/psLibSDRS.tex	(revision 3744)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.203 2005-04-21 03:26:00 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.204 2005-04-21 23:48:57 price Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -2857,5 +2857,5 @@
 psImage *psImageTransform(psImage *output, psArray **blankPixels, const psImage *input,
                           const psImage *inputMask, int inputMaskVal, const psPlaneTransform *outToIn,
-			  const psRegion *region, const psArray *pixels, psImageInterpolateMode mode,
+			  const psRegion *region, const psPixels *pixels, psImageInterpolateMode mode,
 			  double exposedValue);
 \end{verbatim}
@@ -2882,9 +2882,9 @@
 image does not correspond to a pixel in the input image (or all
 appropriate pixels in the input image are masked), the value shall be
-set to \code{exposed}, and the appropriate \code{psPixelCoord} added
-to the array of \code{blankPixels} for return to the user.  This
-function must be capable of handling the following types for the
-\code{input} (with corresponding types for the \code{output}):
-\code{psF32}, \code{psF64}.
+set to \code{exposed}, and the pixel added to the appropriate list of
+pixels (\code{psPixels}) in the array of \code{blankPixels} for return
+to the user.  This function must be capable of handling the following
+types for the \code{input} (with corresponding types for the
+\code{output}): \code{psF32}, \code{psF64}.
 
 
@@ -3053,41 +3053,47 @@
     int y;			// y coordinate
 } psPixelCoord;
-\end{verbatim}
-
-\begin{verbatim}
-psImage *psPixelsToMask(psImage *out, const psArray *pixels, const psRegion *region, unsigned int maskVal);
-psArray *psMaskToPixels(psArray *out, const psImage *mask, unsigned int maskVal);
+
+typedef struct {
+    int n;                      // Number in use
+    const int nalloc;           // Number allocated
+    psPixelCoord *data;		// The pixel coordinates
+} psPixels;
+\end{verbatim}
+
+\begin{verbatim}
+psImage *psPixelsToMask(psImage *out, const psPixels *pixels, const psRegion *region, unsigned int maskVal);
+psPixels *psMaskToPixels(psPixels *out, const psImage *mask, unsigned int maskVal);
 \end{verbatim}
 
 \code{psPixelsToMask} shall return an image of type U8 with the
-\code{pixels} (being a \code{psArray} of \code{psPixelCoord}s) lying
-within the specified \code{region} set to the \code{maskVal}.  The
-\code{out} image shall be modified if supplied, or allocated and
-returned if \code{NULL}.  The size of the output image shall be
-\code{region->x1 - region->x0} by \code{region->y1 - region->y0}, with
-\code{out->x0 = region->x0} and \code{out->y0 = region->y0}.  In the
-event that either of \code{pixels} or \code{region} are \code{NULL},
-the function shall generate an error and return \code{NULL}.
-
-\code{psMaskToPixels} shall return a \code{psArray} containing one
-\code{psPixelCoord} for each of the coordinates in the \code{mask}
-that match the \code{maskVal}.  The \code{out} pixel list shall be
-modified if supplied, or allocated and returned if \code{NULL}.  In
-hte event that \code{mask} is \code{NULL}, the function shall generate
-an error and return \code{NULL}.
-
-\begin{verbatim}
-psArray *psPixelsConcatenate(psArray *out, const psArray *pixels);
-\end{verbatim}
-
-\code{psPixelsConcatenate} shall concatenate the array of
-\code{pixels} (consisting of \code{psPixelCoord}s) onto \code{out}.
-In the event that \code{out} is \code{NULL}, a new \code{psArray}
-shall be allocated, and the contents of \code{pixels} simply copied
-in.  If \code{pixels} is \code{NULL}, the function shall generate an
-error and return \code{NULL}.  The function shall take care to ensure
-that there are no duplicate pixels in \code{out} (since the order in
-which the pixels are stored is not important, the values may be
-sorted, allowing the use of a faster algorithm than a linear scan).
+\code{pixels} lying within the specified \code{region} set to the
+\code{maskVal}.  The \code{out} image shall be modified if supplied,
+or allocated and returned if \code{NULL}.  The size of the output
+image shall be \code{region->x1 - region->x0} by \code{region->y1 -
+region->y0}, with \code{out->x0 = region->x0} and \code{out->y0 =
+region->y0}.  In the event that either of \code{pixels} or
+\code{region} are \code{NULL}, the function shall generate an error
+and return \code{NULL}.
+
+\code{psMaskToPixels} shall return a \code{psPixels} containing the
+coordinates in the \code{mask} that match the \code{maskVal}.  The
+\code{out} pixel list shall be modified if supplied, or allocated and
+returned if \code{NULL}.  In hte event that \code{mask} is
+\code{NULL}, the function shall generate an error and return
+\code{NULL}.
+
+\begin{verbatim}
+psPixels *psPixelsConcatenate(psPixels *out, const psPixels *pixels);
+\end{verbatim}
+
+\code{psPixelsConcatenate} shall concatenate the \code{pixels} onto
+\code{out}.  In the event that \code{out} is \code{NULL}, a new
+\code{psPixels} shall be allocated, and the contents of \code{pixels}
+simply copied in.  If \code{pixels} is \code{NULL}, the function shall
+generate an error and return \code{NULL}.  The function shall take
+care to ensure that there are no duplicate pixels in \code{out} (since
+the order in which the pixels are stored is not important, the values
+may be sorted, allowing the use of a faster algorithm than a linear
+scan).
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5143,10 +5149,9 @@
 
 \begin{verbatim}
-psArray *psPixelsTransform(psArray *out, const psArray *input, const psPlaneTransform *inToOut);
-\end{verbatim}
-
-\code{psPixelsTransform} shall generate an array of pixels
-(\code{psPixelCoord} in the output coordinate frame that overlap the
-\code{input} pixels (an array of \code{psPixelCoord}s) in the input
+psPixels *psPixelsTransform(psPixels *out, const psPixels *input, const psPlaneTransform *inToOut);
+\end{verbatim}
+
+\code{psPixelsTransform} shall generate a list of pixels in the output
+coordinate frame that overlap the \code{input} pixels in the input
 coordinate frame through the specified transformation, \code{inToOut}.
 Note that this is more complicated than simply transforming the
