Index: trunk/archive/pslib/include/psImage.h
===================================================================
--- trunk/archive/pslib/include/psImage.h	(revision 257)
+++ trunk/archive/pslib/include/psImage.h	(revision 268)
@@ -14,12 +14,12 @@
     union {
 	psF32 **rows;		        ///< == rows_f32 
-	psS8  **rows_s8;			///< pointers to psS8 data 
-	psS16 **rows_s16;			///< pointers to psS16 data 
-	psS32 **rows_s32;			///< pointers to psS32 data 
-	psU8  **rows_u8;			///< pointers to psU8 data 
-	psU16 **rows_u16;			///< pointers to psU16 data 
-	psU32 **rows_u32;			///< pointers to psU32 data 
-	psF32 **rows_f32;			///< pointers to psF32 data 
-	psF64 **rows_f64;			///< pointers to psF64 data 
+	psS8  **rows_s8;		///< pointers to psS8 data 
+	psS16 **rows_s16;		///< pointers to psS16 data 
+	psS32 **rows_s32;		///< pointers to psS32 data 
+	psU8  **rows_u8;		///< pointers to psU8 data 
+	psU16 **rows_u16;		///< pointers to psU16 data 
+	psU32 **rows_u32;		///< pointers to psU32 data 
+	psF32 **rows_f32;		///< pointers to psF32 data 
+	psF64 **rows_f64;		///< pointers to psF64 data 
     } rows;
     struct psImage *parent;		///< parent, if a subimage 
@@ -48,22 +48,22 @@
 	       int ny,			///< subimage width (<= image.ny - y0)  
 	       int x0,			///< subimage x-offset (0 <= x0 < nx)   
-	       int y0			///< subimage y-offset (0 <= y0 < ny)   
-    );
+	       int y0)			///< subimage y-offset (0 <= y0 < ny)   
+;
 
 /// Destroy the specified image (destroy children if they exist).
 void 
-psImageFree (psImage *image		///< free this image
-);
+psImageFree (psImage *image)		///< free this image
+;
 
 /// Destroy the children of the specified image.
 int 
-psImageFreeChildren (psImage *image	///< free children of this image
-);
+psImageFreeChildren (psImage *image)	///< free children of this image
+;
 
 /// Create a copy of the specified image.
 psImage *
 psImageCopy (psImage *output, 		///< target structure for output image data
-	     psImage *input		///< copy this image 
-);
+	     psImage *input)		///< copy this image 
+;
 
 /*** various image pixel extractions ***/
@@ -77,6 +77,6 @@
 	      int ny, 			///< width of region in y
 	      int direction,		///< direction of vector along slice
-	      psStats *stats		///< defines statistics used to find output values
-);
+	      psStats *stats)		///< defines statistics used to find output values
+;
 
 /// Extract pixels along a line to a vector.
@@ -88,6 +88,6 @@
 	    float ye, 			///< ending y coord of cut
 	    float dw, 			///< width of cut
-	    psStats *stats		///< defines statistics used to find output values
-    );
+	    psStats *stats)		///< defines statistics used to find output values
+;
 
 /// Extract radial annulii data to a vector.
@@ -98,6 +98,6 @@
 		  float radius, 	///< outer radius of annulii
 		  float dr,		///< radial step size of annulii
-		  psStats *stats		///< defines statistics used to find output values
-    );
+		  psStats *stats)		///< defines statistics used to find output values
+;
 
 /// Extract a 2-d contour from an image at the given threshold.
@@ -105,6 +105,6 @@
 psImageContour (psImage *input, 	///< create contour for this image
 		float threshold,	///< contour image at this threshold
-		int binning		///< bin image by this value for contour calculation
-);
+		int binning)		///< bin image by this value for contour calculation
+;
 
 /*** various image geometry manipulation ***/
@@ -113,12 +113,12 @@
 psImageRebin (psImage *input, 		///< rebin this image
 	      float scale, 		///< rebinning scale: doutput = scale*dinput
-	      psStats *stats		///< defines statistics used to find output values
-);
+	      psStats *stats)		///< defines statistics used to find output values
+;
 
 /// Rotate image by given angle.
 psImage *
 psImageRotate (psImage *input, 		///< rotate this image
-	       float angle		///< rotate by this amount (degrees)
-);
+	       float angle)		///< rotate by this amount (degrees)
+;
 
 /// Shift image by an arbitrary number of pixels in either direction.
@@ -128,6 +128,6 @@
 	      float dx, 		///< shift by this amount in x
 	      float dy, 		///< shift by this amount in y
-	      float exposed		///< set exposed pixels to this value
-);
+	      float exposed)		///< set exposed pixels to this value
+;
 
 /// Roll image by an integer number of pixels in either direction.
@@ -136,29 +136,30 @@
 psImageRoll (psImage *input, 		///< roll this image
 	     int dx, 			///< roll this amount in x
-	     int dy			///< roll this amount in y
-);
+	     int dy)			///< roll this amount in y
+;
 
 /// Determine statistics for image (or subimage).
 psStats *
 psImageGetStats (psImage *input, 	///< image (or subimage) to calculate stats
-		 psStats *stats);	///< defines statistics to be calculated
+		 psStats *stats)	///< defines statistics to be calculated
+;
 
 /// Construct a histogram from an image (or subimage).
 psHistogram *
 psImageHistogram (psHistogram *hist,	///< input histogram description & target
-		  psImage *input	///< determine histogram of this image
-    );
+		  psImage *input)	///< determine histogram of this image
+;
 
 /// Fit a 2-D polynomial surface to an image.
 psPolynomial2D *
 psImageFitPolynomial (psImage *input, 	///< image to fit
-		      psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
-);
+		      psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms
+;
 
 /// Evaluate a 2-D polynomial surface to image pixels.
 int
 psImageEvalPolynomial (psImage *input, 	///< image to fit
-		       psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
-);
+		       psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms
+;
 
 /*** image input/output routines ***/
@@ -168,10 +169,11 @@
 		    int x, 		///< starting x coord of region
 		    int y, 		///< starting y coord of region
-		    int dx, 		///< x size of region (-1 for full range)
-		    int dy, 		///< y size of region (-1 for full range)
+		    int nx, 		///< x size of region (-1 for full range)
+		    int ny, 		///< y size of region (-1 for full range)
 		    int z, 		///< plane of interest
 		    char *extname, 	///< MEF extension name ("PHU" for primary header)
-		    char *filename	///< file to read data from
-);
+		    int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+		    char *filename)	///< file to read data from
+;
 
 /// Read an image or subimage from file descriptor.
@@ -184,6 +186,7 @@
 		     int z,		///< plane of interest			   
 		     char *extname,	///< MEF extension name ("PHU" for primary header)			   
-		     FILE *f		///< file descriptor to read data from		   
-);
+		     int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+		     FILE *f)		///< file descriptor to read data from		   
+;
 
 /// Write an image section to named file (which may exist).
@@ -194,6 +197,7 @@
 		     int z, 		///< plane of interest			   
 		     char *extname, 	///< MEF extension name ("PHU" for primary header)			   
-		     char *filename	///< file to write data to		   
-);
+		     int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+		     char *filename)	///< file to write data to		   
+;
 
 /// Write an image section to named file (which may exist).
@@ -204,6 +208,7 @@
 		     int z, 		///< plane of interest			   
 		     char *extname, 	///< MEF extension name			   
-		     FILE *f		///< file descriptor to write data to		   
-);
+		     int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+		     FILE *f)		///< file descriptor to write data to		   
+;
 
 /// Read only header from image file.
@@ -211,13 +216,15 @@
 psImageReadHeader(struct psMetadata *output, 	///< read data to this structure
 		  char *extname, 	///< MEF extension name ("PHU" for primary header)
-		  char *filename	///< file to read from
-); 
+		  int extnum,		///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+		  char *filename)	///< file to read from
+;
 
 /// Read only header from image file descriptor.
 struct psMetadata *
 psImageFReadHeader (struct psMetadata *output, ///< read data to this structure
-		   char *extname, 	///< MEF extension name ("PHU" for primary header)
-		   FILE *f		///< file descriptor to read from
-); 
+		    char *extname, 	///< MEF extension name ("PHU" for primary header)
+		    int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+		    FILE *f)		///< file descriptor to read from
+;
 
 /*** image FFT operations ***/
@@ -225,6 +232,6 @@
 psImage *
 psImageFFT (psImage *input, 		///< image to FFT
-	    int direction		///< FFT direction 
-);
+	    int direction)		///< FFT direction 
+;
 
 /*** basic pixel manipulations ***/
@@ -235,12 +242,12 @@
 	     float vmin, 		///< set min-clipped pixels to vmin
 	     float max, 		///< clip pixels with values > max
-	     float vmax			///< set max-clipped pixels to vmax
-);
+	     float vmax)		///< set max-clipped pixels to vmax
+;
 
 /// Clip NaN image pixels to given value.
 int
 psImageClipNaN (psImage *input, 	///< clip this image
-		float value		///< set nan pixels to this value
-);
+		float value)		///< set nan pixels to this value
+;
 
 /*** image arithmetic ***/
@@ -250,6 +257,6 @@
 		 psImage *in1,		///< first input image 
 		 char *operator,	///< operator 
-		 psImage *in2		///< second input image 
-);
+		 psImage *in2)		///< second input image 
+;
 
 /// Perform a unary operation on an image.
@@ -257,15 +264,15 @@
 psImageUnaryOp (psImage *out,		///< destination image (may be NULL) 
 		psImage *in1,		///< input image 
-		char *operator		///< operator 
-);
+		char *operator)		///< operator 
+;
 
 /// Overlay subregion of image with another image.
 int 
-psImageOverlaySection (psImage *image,		///< input image 
+psImageOverlaySection (psImage *image,	///< input image 
 		psImage *overlay,	///< image to overlay 
 		int x0,			///< x offset of overlay subimage 
 		int y0,			///< y offset of overlay subimage 
-		char *operator		///< overlay operation 
-);
+		char *operator)		///< overlay operation 
+;
 
 /* \} */ // End of AstroGroup Functions
