Index: trunk/archive/pslib/include/psImage.h
===================================================================
--- trunk/archive/pslib/include/psImage.h	(revision 527)
+++ trunk/archive/pslib/include/psImage.h	(revision 617)
@@ -10,6 +10,6 @@
 typedef struct psImage {
     psType type; 			///< image data type and dimension
-    int nx, ny;				///< size of image 
-    int x0, y0;				///< data region relative to parent 
+    const int nx, ny;			///< size of image 
+    const int x0, y0;			///< data region relative to parent 
     union {
 	float **rows;			///< Pointers to floating-point data (default)
@@ -24,5 +24,5 @@
 	complex float **rows_complex;	///< Pointers to complex floating-point data
     } rows;
-    struct psImage *parent;		///< parent, if a subimage 
+    const struct psImage *parent;	///< parent, if a subimage 
     int Nchildren;			///< number of subimages 
     struct psImage *children;		///< children of this region; array of Nchildren pointers
@@ -40,11 +40,10 @@
 psImageAlloc (int nx,			///< image width 
 	      int ny,			///< image height 
-	      psType type		///< image data type 
+	      psElemType type		///< image data type 
     );
 
 /// Create a subimage of the specified area.
 psImage *
-psImageSubset(psImage *out,		///< Subimage to return, or NULL
-	      const psImage *image,	///< parent image 
+psImageSubset(const psImage *image,	///< parent image 
 	      int nx,			///< subimage width (<= image.nx - x0)  
 	      int ny,			///< subimage width (<= image.ny - y0)  
@@ -63,13 +62,9 @@
     );
 
-/// Destroy the children of the specified image.  Returns number of children freed.
-int 
-psImageFreeChildren(const psImage *image ///< free children of this image
-    );
-
 /// Create a copy of the specified image.
 psImage *
 psImageCopy(psImage *output, 		///< target structure for output image data
-	    const psImage *input	///< copy this image 
+	    const psImage *input,	///< copy this image 
+	    psElemType type		///< element type of output image
     );
 
@@ -106,19 +101,7 @@
 		 float x, 		///< center x coord of annulii
 		 float y, 		///< center y coord of annulii
-		 float radius,		///< outer radius of annulii
-		 float dr,		///< radial step size of annulii
+		 const psFloatArray *radii, ///< Radii of the annuli
 		 const psStats *stats	///< defines statistics used to find output values
     );
-
-/* Contour is a high-level function */
-#if 0
-/// Extract a 2-d contour from an image at the given threshold.
-psFloatArray *
-psImageContour(psFloatArray *out,	///< Vector to output, or NULL
-	       const psImage *input, 	///< create contour for this image
-	       float threshold,	///< contour image at this threshold
-	       int binning		///< bin image by this value for contour calculation
-    );
-#endif
 
 /*** various image geometry manipulation ***/
@@ -159,7 +142,7 @@
 /// Determine statistics for image (or subimage).
 psStats *
-psImageGetStats(const psImage *input, 	///< image (or subimage) to calculate stats
-		psStats *stats		///< defines statistics to be calculated & target
-    );
+psImageGetStats(psStats *stats,		///< defines statistics to be calculated & target
+		const psImage *input 	///< image (or subimage) to calculate stats
+		);
 
 /// Construct a histogram from an image (or subimage).
@@ -171,11 +154,11 @@
 /// Fit a 2-D polynomial surface to an image.
 psPolynomial2D *
-psImageFitPolynomial(const psImage *input, ///< image to fit
-		     psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
+psImageFitPolynomial(psPolynomial2D *coeffs, ///< coefficient structure carries in desired terms & target
+		     const psImage *input ///< image to fit
     );
 
 /// Evaluate a 2-D polynomial surface to image pixels.
-int
-psImageEvalPolynomial(const psImage *input, ///< image to fit
+psImage *
+psImageEvalPolynomial(const psImage *input, ///< image to produce
 		      const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
     );
@@ -210,5 +193,5 @@
 /// Write an image section to named file (which may exist).
 psImage *
-psImageWriteSection(psImage *input,    ///< image to write out
+psImageWriteSection(const psImage *input, ///< image to write out
 		    int x, 		///< starting x coord of region		   
 		    int y, 		///< starting y coord of region		   
@@ -221,5 +204,5 @@
 /// Write an image section to named file (which may exist).
 psImage *
-psImageFWriteSection(psImage *input,	///< image to write out
+psImageFWriteSection(const psImage *input, ///< image to write out
 		     int x, 		///< starting x coord of region		   
 		     int y, 		///< starting y coord of region		   
@@ -240,5 +223,5 @@
 /// Read only header from image file descriptor.
 psMetadata *
-psImageFReadHeader(psMetadata *output, ///< read data to this structure
+psImageFReadHeader(psMetadata *output,	///< read data to this structure
 		   const char *extname,	///< MEF extension name ("PHU" for primary header)
 		   int extnum,		///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
@@ -249,5 +232,5 @@
 /// Clip image values outside of range to given values.  Return number of clipped pixels.
 int
-psImageClip(psImage *input, 		///< clip this image
+psImageClip(psImage *input, 		///< Image to be clipped, and output
 	    float min,			///< clip pixels with values < min
 	    float vmin, 		///< set min-clipped pixels to vmin
