Index: trunk/psLib/src/image/psImage.h
===================================================================
--- trunk/psLib/src/image/psImage.h	(revision 597)
+++ trunk/psLib/src/image/psImage.h	(revision 599)
@@ -1,62 +1,109 @@
+/** @file  psImage.h
+ *
+ *  @brief Contains basic image definitions and operations
+ *
+ *  This file defines the basic type for an image struct and functions useful in manupulating images.
+ *
+ *  @author Ross Harman, MHPCC
+ *   
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-07 02:56:52 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
 # ifndef PS_IMAGE_H
 # define PS_IMAGE_H
 
-/** \file psImage.h
- *  \brief Basic image definitions and operations.
- *  \ingroup AstroGroup
- */
-
-/// basic image data structure.
+#include <complex.h>
+
+/******************************************************************************/
+/*  DEFINE STATEMENTS                                                         */
+/******************************************************************************/
+
+// None
+
+/******************************************************************************/
+/*  TYPE DEFINITIONS                                                          */
+/******************************************************************************/
+
+/** Basic image data structure.
+ *
+ * Struct for maintaining image data of varying types. It also contains information about image size, parent
+ * images and children images.
+ *
+ */
 typedef struct psImage
 {
-    psType type;    ///< image data type and dimension
-    int nx, ny;    ///< size of image
-    int x0, y0;    ///< data region relative to parent
+    psType type;                    ///< Image data type and dimension.
+    int nx, ny;                     ///< Size of image.
+    int x0, y0;                     ///< Data region relative to parent.
     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
-        psComplex **rows_complex; ///< pointers to psComplex data
-    } rows;
-    struct psImage *parent;  ///< parent, if a subimage
-    int Nchildren;   ///< number of subimages
-    struct psImage *children;  ///< children of this region; array of Nchildren pointers
+        float **rows                ///< Pointers to floating point data (default).
+        short **rows_s;             ///< Pointers to short integer data.
+        int **rows_i;               ///< Pointers to integer data.
+        long **rows_l ;             ///< Pointers to long integer data.
+        unsigned short **rows_us;   ///< Pointers to unsigned short integer data.
+        unsigned int **rows_ui;     ///< Pointers to unsigned integer data.
+        unsigned long **rows_ul;    ///< Pointers to unsigned long integer data.
+        float **rows_f              ///< Pointers to floating point data.
+        double **rows_d             ///< Pointers to double precision data.
+        complex float **rows_cf     ///< Pointers to complex floating point data.
+    } rows;                         ///< Union for data types.
+    struct psImage *parent;         ///< Parent, if a subimage.
+    int nChildren;                  ///< Number of subimages.
+    struct psImage *children;       ///< Children of this region.
 }
 psImage;
 
-/** Functions **************************************************************/
-/** \addtogroup AstroGroup Astronomy-Specific Utilities
- *  \{
- */
-
-/*** Image structure manipulation ***/
-
-/// Create an image of the specified size and type.
-psImage *
-psImageAlloc (int nx,   ///< image width
-              int ny,   ///< image height
-              psType 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
-              int nx,   ///< subimage width (<= image.nx - x0)
-              int ny,   ///< subimage width (<= image.ny - y0)
-              int x0,   ///< subimage x-offset (0 <= x0 < nx)
-              int y0   ///< subimage y-offset (0 <= y0 < ny)
-             );
-
-/// Destroy the specified image (destroy children if they exist).
-void
-psImageFree(psImage *restrict image ///< free this image
-           );
+/*****************************************************************************/
+/* FUNCTION PROTOTYPES                                                       */
+/*****************************************************************************/
+
+
+/** Create an image of the specified size and type.
+ *
+ * Uses psLib memory allocation functions to create an image struct of the specified size and type. 
+ *
+ * @return psImage*: Pointer to psImage.
+ *
+ */
+psImage *psImageAlloc(
+    int nx,     ///< Image width.
+    int ny,     ///< Image height.
+    psType type ///< Image data type.
+);
+
+/** Create a subimage of the specified area.
+ *
+ * Uses psLib memory allocation functions to create an image based on a larger one. 
+ *
+ * @return psImage*: Pointer to psImage.
+ *
+ */
+psImage *psImageSubset(
+    psImage *out,           ///< Subimage to return, or NULL.
+    const psImage *image,   ///< Parent image.
+    int nx,                 ///< Subimage width (<= image.nx - x0).
+    int ny,                 ///< Subimage width (<= image.ny - y0).
+    int x0,                 ///< Subimage x-offset (0 <= x0 < nx).
+    int y0                  ///< Subimage y-offset (0 <= y0 < ny).
+);
+
+/** Destroy the specified image.
+ *
+ *  Uses psLib memory deallocation functions to free an image and any existing children. 
+ *
+ * @return psImage*: Pointer to psImage.
+ *
+ */
+void psImageFree(
+    psImage *restrict image ///< free this image
+);
+
+
+
+// DOXYGEN COMMENTING FORMAT NOT YET FULLY IMPLEMENTED BEYOND THIS POINT
+
+
 
 /** Destroy the pixels of the specified image */
