Index: trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- trunk/doc/pslib/psLibSDRS.tex	(revision 1692)
+++ trunk/doc/pslib/psLibSDRS.tex	(revision 1693)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.108 2004-09-04 04:29:14 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.109 2004-09-07 00:52:16 eugene Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -2341,5 +2341,5 @@
 
 \begin{verbatim}
-psImage *psImageSubsection(const psImage *image, const char *section);
+psImage *psImageSubsection(psImage *image, const char *section);
 \end{verbatim}
 Similar to \code{psImageSubset}, but uses an image \code{section}, of
@@ -2364,5 +2364,5 @@
 
 \begin{verbatim}
-psImage *psImageTrim(psImage *image, int x0, int x1, int y0, int y1);
+psImage *psImageTrim(psImage *image, int x0, int y0, int x1, int y1);
 \end{verbatim}
 Trim the specified \code{image} in-place, which involves shuffling the
@@ -2418,26 +2418,36 @@
 
 \begin{verbatim}
-psVector *psImageCut(psVector *out, const psImage *input, 
-                     const psImage *mask, unsigned int maskVal,
-                     float xs, float ys, float xe, float ye, 
-                     unsigned int nSamples, psImageInterpolateMode mode);
-\end{verbatim}
-Extract pixels along a line segment, \code{(xs,ys)} to \code{(xe,ye)},
-on the image to a vector (array of the appropriate data type).  The
-line segment is sampled \code{nSamples} times, hence the output vector
-contains \code{nSamples} elements.  The interpolation method used to
-derive the output vector value at each sample along the line segment
-is specified by \code{mode}.  If the \code{mask} is non-\code{NULL},
-then pixels for which the corresponding mask value is \code{maskVal}
-are not included in the interpolation.  This function must be defined
-for the following types: \code{psS8}, \code{psU16}, \code{psF32},
+psVector *psImageCut(psVector *out, 
+                     psVector *coords, 
+                     const psImage *input, 
+                     const psImage *mask, 
+                     unsigned int maskVal,
+                     float x0, 
+		     float y0, 
+		     float x1, 
+		     float y1, 
+		     unsigned int nSamples, 
+		     psImageInterpolateMode mode);
+\end{verbatim}
+Extract pixels along a line segment, \code{(x0,y0)} to \code{(x1,y1)},
+on the image to a vector of the same data type.  The line segment is
+sampled \code{nSamples} times, hence the output vector contains
+\code{nSamples} elements.  The interpolation method used to derive the
+output vector value at each sample along the line segment is specified
+by \code{mode}.  If the \code{mask} is non-\code{NULL}, then pixels
+for which the corresponding mask value is \code{maskVal} are not
+included in the interpolation.  This function must be defined for the
+following types: \code{psS8}, \code{psU16}, \code{psF32},
 \code{psF64}.
 
 \begin{verbatim}
-psVector *psImageRadialCut(psVector *out, const psImage *input, 
+psVector *psImageRadialCut(psVector *out, 
+                           const psImage *input, 
                            const psImage *mask, 
                            unsigned int maskVal,
-                           float x, float y,
-                           const psVector *radii, const psStats *stats);
+                           float x, 
+			   float y,
+                           const psVector *radii, 
+			   const psStats *stats);
 \end{verbatim}
 Extract radial region data to a vector.  A vector is constructed where
@@ -2612,5 +2622,5 @@
 is specified by \code{x0,y0}, while the upper right-hand corner of the
 requested region is specified by \code{x1,y1}.  A negative value for
-either of \code{x1} or \code{y2} specifies the size of the region to
+either of \code{x1} or \code{y1} specifies the size of the region to
 be read counting down from the end of the array.
 
@@ -3395,5 +3405,5 @@
 The \code{psMetadataAdd} routine is required to check that all
 metadata names are unique unless the type is already qualified as
-\code{PS_META_NON_UNIQUE}; in this case the data are added to the
+\code{PS_META_ITEM_SET}; in this case the data are added to the
 corresponding \code{psMetadataItem.items} list.
 
@@ -3440,5 +3450,5 @@
 Care should be taken not to leak memory when appending an item for
 which the key already exists in the metadata (and is not
-\code{PS_META_NON_UNIQUE}).
+\code{PS_META_ITEM_SET}).
 %
 \begin{verbatim}
@@ -4036,63 +4046,2 @@
 
 \end{document}
-
-
-An example of the usage of the metadata APIs is as follows:
-\begin{verbatim}
-    for (int i = 0; i < 10; i += 5) {
-        float sqrti = sqrt(i);
-        psMetadataAdd(ms, PS_LIST_TAIL, psMetadataItemAlloc(PS_META_INT, &i, NULL, "const.%d", i));
-        psMetadataAdd(ms, PS_LIST_TAIL, psMetadataItemAlloc(PS_META_FLOAT, &sqrti,
-                      "square root", "const.sqrt%d", i));
-    }
-    psMetadataAdd(ms, psMetadataItemAlloc(PS_META_STR, "Bonjour", "French", "lang.hello"));
-    /*
-     * Remove a key
-     */
-    psMetadataItemFree(psMetadataRemove(ms, PS_LIST_UNKNOWN, "lang.hello"));
-    /*
-     * Print all metadata
-     */
-    fprintf(stdout, "------\n");
-    psMetadataSetIterator(ms, 1, PS_LIST_HEAD);
-    while ((meta = psMetadataGetNext(ms, NULL, 1)) != NULL) {
-        psMetadataItemPrint(stdout, meta, "");
-    }
-    /*
-     * Look up a key by name
-     */
-    fprintf(stdout, "------\n");
-    fprintf(stdout, "Looking up by name:\n");
-    meta = psMetadataLookup(ms, "const.5");
-    if (meta != NULL) {
-        psMetadataItemPrint(stdout, meta, "");
-    }
-\end{verbatim}
-
-\subsubsection{Naming convention for Metadata}
-
-The \code{psMetadataItem} struct includes a name.  This name should be of
-the form \code{name1.name2.name3}$\cdots$, e.g.\hfil\break
-\null\qquad\qquad\code{IPP.phase1.ota12.biassec}.
-
-We must set in place a system for assigning the top-level `domains'
-to responsible individuals, and for gathering a complete list of
-all metadata names in use throughout the project.
-
-\paragraph{Support for Multiple Values for a Given Name}
-
-\begin{verbatim}
-    psMetadataAdd(ms, PS_LIST_UNKNOWN, psMetadataItemAlloc(PS_META_STR | PS_META_NON_UNIQUE,
-                                                           "Bonjour", "French", "lang.hello"));
-    psMetadataAdd(ms, PS_LIST_UNKNOWN, psMetadataItemAlloc(PS_META_STR | PS_META_NON_UNIQUE,
-                                                           "Aloha", "Hawaiian", "lang.hello"));
-    psMetadataAdd(ms, PS_LIST_UNKNOWN, psMetadataItemAlloc(PS_META_STR | PS_META_NON_UNIQUE,
-                                                           "Good Morning", "English", "lang.hello"));
-    /*
-     * Print all metadata starting "lang"
-     */
-    psMetadataSetIterator(ms, 2, PS_LIST_HEAD);
-    while ((meta = psMetadataGetNext(ms, "lang", 2)) != NULL) {
-        psMetadataItemPrint(stdout, meta, "");
-    }
-\end{verbatim}
