Index: /trunk/psLib/psLib.kdevses
===================================================================
--- /trunk/psLib/psLib.kdevses	(revision 713)
+++ /trunk/psLib/psLib.kdevses	(revision 714)
@@ -2,50 +2,25 @@
 <!DOCTYPE KDevPrjSession>
 <KDevPrjSession>
- <DocsAndViews NumberOfDocuments="9" >
-  <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/psError.h" >
-   <View0 line="16" Type="???" >
-    <AdditionalSettings Top="1" Width="1532" Attach="1" Height="943" Left="1" MinMaxMode="0" />
+ <DocsAndViews NumberOfDocuments="4" >
+  <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psImage.h" >
+   <View0 line="115" Type="???" >
+    <AdditionalSettings Top="1" Width="1291" Attach="1" Height="772" Left="1" MinMaxMode="0" />
    </View0>
   </Doc0>
-  <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/psError.c" >
-   <View0 line="72" Type="???" >
-    <AdditionalSettings Top="1" Width="1532" Attach="1" Height="914" Left="1" MinMaxMode="0" />
+  <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/Makefile" >
+   <View0 line="4" Type="???" >
+    <AdditionalSettings Top="1" Width="1291" Attach="1" Height="772" Left="1" MinMaxMode="0" />
    </View0>
   </Doc1>
-  <Doc2 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/psTrace.h" >
-   <View0 line="0" Type="???" >
-    <AdditionalSettings Top="1" Width="1217" Attach="1" Height="599" Left="1" MinMaxMode="0" />
+  <Doc2 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/Makefile" >
+   <View0 line="73" Type="???" >
+    <AdditionalSettings Top="1" Width="1291" Attach="1" Height="772" Left="1" MinMaxMode="0" />
    </View0>
   </Doc2>
-  <Doc3 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/psLogMsg.h" >
-   <View0 line="16" Type="???" >
-    <AdditionalSettings Top="1" Width="1217" Attach="1" Height="599" Left="1" MinMaxMode="0" />
+  <Doc3 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psImage.c" >
+   <View0 line="69" Type="???" >
+    <AdditionalSettings Top="1" Width="1291" Attach="1" Height="772" Left="1" MinMaxMode="0" />
    </View0>
   </Doc3>
-  <Doc4 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/psLogMsg.c" >
-   <View0 line="318" Type="???" >
-    <AdditionalSettings Top="1" Width="1217" Attach="1" Height="599" Left="1" MinMaxMode="0" />
-   </View0>
-  </Doc4>
-  <Doc5 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/psMemory.c" >
-   <View0 line="388" Type="???" >
-    <AdditionalSettings Top="1" Width="1355" Attach="1" Height="787" Left="1" MinMaxMode="0" />
-   </View0>
-  </Doc5>
-  <Doc6 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/psImage.h" >
-   <View0 line="45" Type="???" >
-    <AdditionalSettings Top="1" Width="1355" Attach="1" Height="772" Left="1" MinMaxMode="0" />
-   </View0>
-  </Doc6>
-  <Doc7 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/psImage.c" >
-   <View0 line="60" Type="???" >
-    <AdditionalSettings Top="1" Width="1355" Attach="1" Height="772" Left="1" MinMaxMode="0" />
-   </View0>
-  </Doc7>
-  <Doc8 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psVector.h" >
-   <View0 line="58" Type="???" >
-    <AdditionalSettings Top="1" Width="1355" Attach="1" Height="772" Left="1" MinMaxMode="0" />
-   </View0>
-  </Doc8>
  </DocsAndViews>
  <pluginList>
Index: /trunk/psLib/src/image/psImage.c
===================================================================
--- /trunk/psLib/src/image/psImage.c	(revision 713)
+++ /trunk/psLib/src/image/psImage.c	(revision 714)
@@ -7,6 +7,6 @@
  *  @author Ross Harman, MHPCC
  *   
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-17 21:00:24 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:33:59 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -121,5 +121,5 @@
 
     for (int row = 0; row < numRows; row++) {
-        memcpy(out->data.v[row],image->data.u8[row0+row] + inputColOffset,outputRowSize);
+        memcpy(out->data.v[row],image->data.U8[row0+row] + inputColOffset,outputRowSize);
     }
 
@@ -165,2 +165,148 @@
     return numFreed;
 }
+
+psImage *psImageCopy(psImage* restrict output, const psImage *input, psElemType type)
+{
+    psElemType inDatatype;
+    int elementSize;
+    int numRows;
+    int numCols;
+
+    if (input == NULL || input->data.v == NULL) {
+        psError(__func__,"Can not copy image because input image or its pixel buffer is NULL.");
+        return NULL;
+    }
+
+    if (input == output) {
+        psError(__func__,"Can not copy image because given input and output parameter reference the same "
+                "psImage struct.");
+        return NULL;
+    }
+
+    if (input->type.dimen != PS_DIMEN_IMAGE) {
+        psError(__func__,"Can not copy image because input image is not actually an image.");
+        return NULL;
+    }
+
+    inDatatype = input->type.type;
+    numRows = input->numRows;
+    numCols = input->numCols;
+    elementSize = PSELEMTYPE_SIZEOF(inDatatype);
+
+    if (inDatatype == PS_TYPE_PTR || type == PS_TYPE_PTR) {
+        psError(__func__,"Can not copy image to/from a void* matrix");
+        return NULL;
+    }
+
+
+    if (output == NULL) {
+        output = psImageAlloc(numCols,numRows,type);
+    } else if (output->numCols != numCols || output->numRows != numRows ||
+               output->type.type != type) {        // sizes/type different, can't reuse the given image buffer
+        psImageFree(output);
+        output = psImageAlloc(numCols,numRows,type);
+    }
+
+    // cover the trival case of copy of the same type.
+    if (type == inDatatype) {
+        memcpy(output->data.v[0],input->data.v[0],elementSize*numRows*numCols);
+        return output;
+    }
+
+    #define PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,INTYPE,OUTTYPE) \
+    { \
+        ps##INTYPE *in; \
+        ps##OUTTYPE *out; \
+        for (int row=0;row<numRows;row++) { \
+            in = IN->data.INTYPE[row]; \
+            out = OUT->data.OUTTYPE[row]; \
+            for (int col=0;col<numCols;col++) { \
+                in[col] = (ps##INTYPE) out[col]; \
+            } \
+        } \
+    }
+
+    #define PSIMAGE_ELEMENT_ASSIGN(OUT,IN,OUTTYPE) \
+    switch (IN->type.type) { \
+    case PS_TYPE_S8: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S8,OUTTYPE); \
+        break; \
+    case PS_TYPE_S16: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S16,OUTTYPE); \
+        break; \
+    case PS_TYPE_S32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S32,OUTTYPE); \
+        break; \
+    case PS_TYPE_S64: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S64,OUTTYPE); \
+        break; \
+    case PS_TYPE_U8: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U8,OUTTYPE); \
+        break; \
+    case PS_TYPE_U16: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U16,OUTTYPE); \
+        break; \
+    case PS_TYPE_U32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U32,OUTTYPE); \
+        break; \
+    case PS_TYPE_U64: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U64,OUTTYPE); \
+        break; \
+    case PS_TYPE_F32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,F32,OUTTYPE); \
+        break; \
+    case PS_TYPE_F64: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,F64,OUTTYPE); \
+        break; \
+    case PS_TYPE_C32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,C32,OUTTYPE); \
+        break; \
+    default: \
+        break; \
+    }
+
+    switch (type) {
+    case PS_TYPE_S8:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S8);
+        break;
+    case PS_TYPE_S16:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S16);
+        break;
+    case PS_TYPE_S32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S32);
+        break;
+    case PS_TYPE_S64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S64);
+        break;
+    case PS_TYPE_U8:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U8);
+        break;
+    case PS_TYPE_U16:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U16);
+        break;
+    case PS_TYPE_U32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U32);
+        break;
+    case PS_TYPE_U64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U64);
+        break;
+    case PS_TYPE_F32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,F32);
+        break;
+    case PS_TYPE_F64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,F64);
+        break;
+    case PS_TYPE_C32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,C32);
+        break;
+    case PS_TYPE_C64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,C64);
+        break;
+    case PS_TYPE_PTR:
+        psError(__func__,"Can't copy image into a matrix of pointers.");
+        psImageFree(output);
+        return NULL;
+    }
+
+    return output;
+}
Index: /trunk/psLib/src/image/psImage.h
===================================================================
--- /trunk/psLib/src/image/psImage.h	(revision 713)
+++ /trunk/psLib/src/image/psImage.h	(revision 714)
@@ -7,6 +7,6 @@
  *  @author Ross Harman, MHPCC
  *   
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-17 20:59:34 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:33:59 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -44,16 +44,16 @@
 
     union {
-        psU8    **u8;                   ///< unsigned 8-bit integer data.
-        psU16   **u16;                  ///< unsigned 16-bit integer data.
-        psU32   **u32;                  ///< unsigned 32-bit integer data.
-        psU32   **u64;                  ///< unsigned 64-bit integer data.
-        psS8    **s8;                   ///< signed 8-bit integer data.
-        psS16   **s16;                  ///< signed 16-bit integer data.
-        psS32   **s32;                  ///< signed 32-bit integer data.
-        psS32   **s64;                  ///< signed 64-bit integer data.
-        psF32   **f32;                  ///< single-precision float data.
-        psF64   **f64;                  ///< double-precision float data.
-        psC32   **c32;                  ///< single-precision complex data.
-        psC32   **c64;                  ///< double-precision complex data.
+        psU8    **U8;                   ///< unsigned 8-bit integer data.
+        psU16   **U16;                  ///< unsigned 16-bit integer data.
+        psU32   **U32;                  ///< unsigned 32-bit integer data.
+        psU64   **U64;                  ///< unsigned 64-bit integer data.
+        psS8    **S8;                   ///< signed 8-bit integer data.
+        psS16   **S16;                  ///< signed 16-bit integer data.
+        psS32   **S32;                  ///< signed 32-bit integer data.
+        psS64   **S64;                  ///< signed 64-bit integer data.
+        psF32   **F32;                  ///< single-precision float data.
+        psF64   **F64;                  ///< double-precision float data.
+        psC32   **C32;                  ///< single-precision complex data.
+        psC64   **C64;                  ///< double-precision complex data.
         void    **v;                    ///< void pointers to data
     } data;                             ///< Union for data types.
@@ -113,5 +113,5 @@
  */
 void psImageFreePixels(
-    psImage *restrict image             ///< psImage to free pixel memory from
+    psImage* restrict image             ///< psImage to free pixel memory from
 );
 
@@ -125,5 +125,16 @@
 );
 
-
+/** Makes a copy of a psImage
+ *
+ * return psImage*  Copy of the input psImage.  This may not be equal to the output parameter
+ *
+ */
+psImage *psImageCopy(
+    psImage* restrict output,
+    ///< if not NULL, a psImage that could be recycled.  If it can not be used, it will be freed via
+    ///< psImageFree
+    const psImage *input,               ///< the psImage to copy
+    psElemType type                     ///< the desired datatype of the returned copy
+);
 
 #endif
Index: /trunk/psLib/src/mathtypes/psImage.c
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.c	(revision 713)
+++ /trunk/psLib/src/mathtypes/psImage.c	(revision 714)
@@ -7,6 +7,6 @@
  *  @author Ross Harman, MHPCC
  *   
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-17 21:00:24 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:33:59 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -121,5 +121,5 @@
 
     for (int row = 0; row < numRows; row++) {
-        memcpy(out->data.v[row],image->data.u8[row0+row] + inputColOffset,outputRowSize);
+        memcpy(out->data.v[row],image->data.U8[row0+row] + inputColOffset,outputRowSize);
     }
 
@@ -165,2 +165,148 @@
     return numFreed;
 }
+
+psImage *psImageCopy(psImage* restrict output, const psImage *input, psElemType type)
+{
+    psElemType inDatatype;
+    int elementSize;
+    int numRows;
+    int numCols;
+
+    if (input == NULL || input->data.v == NULL) {
+        psError(__func__,"Can not copy image because input image or its pixel buffer is NULL.");
+        return NULL;
+    }
+
+    if (input == output) {
+        psError(__func__,"Can not copy image because given input and output parameter reference the same "
+                "psImage struct.");
+        return NULL;
+    }
+
+    if (input->type.dimen != PS_DIMEN_IMAGE) {
+        psError(__func__,"Can not copy image because input image is not actually an image.");
+        return NULL;
+    }
+
+    inDatatype = input->type.type;
+    numRows = input->numRows;
+    numCols = input->numCols;
+    elementSize = PSELEMTYPE_SIZEOF(inDatatype);
+
+    if (inDatatype == PS_TYPE_PTR || type == PS_TYPE_PTR) {
+        psError(__func__,"Can not copy image to/from a void* matrix");
+        return NULL;
+    }
+
+
+    if (output == NULL) {
+        output = psImageAlloc(numCols,numRows,type);
+    } else if (output->numCols != numCols || output->numRows != numRows ||
+               output->type.type != type) {        // sizes/type different, can't reuse the given image buffer
+        psImageFree(output);
+        output = psImageAlloc(numCols,numRows,type);
+    }
+
+    // cover the trival case of copy of the same type.
+    if (type == inDatatype) {
+        memcpy(output->data.v[0],input->data.v[0],elementSize*numRows*numCols);
+        return output;
+    }
+
+    #define PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,INTYPE,OUTTYPE) \
+    { \
+        ps##INTYPE *in; \
+        ps##OUTTYPE *out; \
+        for (int row=0;row<numRows;row++) { \
+            in = IN->data.INTYPE[row]; \
+            out = OUT->data.OUTTYPE[row]; \
+            for (int col=0;col<numCols;col++) { \
+                in[col] = (ps##INTYPE) out[col]; \
+            } \
+        } \
+    }
+
+    #define PSIMAGE_ELEMENT_ASSIGN(OUT,IN,OUTTYPE) \
+    switch (IN->type.type) { \
+    case PS_TYPE_S8: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S8,OUTTYPE); \
+        break; \
+    case PS_TYPE_S16: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S16,OUTTYPE); \
+        break; \
+    case PS_TYPE_S32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S32,OUTTYPE); \
+        break; \
+    case PS_TYPE_S64: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,S64,OUTTYPE); \
+        break; \
+    case PS_TYPE_U8: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U8,OUTTYPE); \
+        break; \
+    case PS_TYPE_U16: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U16,OUTTYPE); \
+        break; \
+    case PS_TYPE_U32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U32,OUTTYPE); \
+        break; \
+    case PS_TYPE_U64: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,U64,OUTTYPE); \
+        break; \
+    case PS_TYPE_F32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,F32,OUTTYPE); \
+        break; \
+    case PS_TYPE_F64: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,F64,OUTTYPE); \
+        break; \
+    case PS_TYPE_C32: \
+        PSIMAGE_ELEMENT_ASSIGN_LOOP(OUT,IN,C32,OUTTYPE); \
+        break; \
+    default: \
+        break; \
+    }
+
+    switch (type) {
+    case PS_TYPE_S8:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S8);
+        break;
+    case PS_TYPE_S16:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S16);
+        break;
+    case PS_TYPE_S32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S32);
+        break;
+    case PS_TYPE_S64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,S64);
+        break;
+    case PS_TYPE_U8:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U8);
+        break;
+    case PS_TYPE_U16:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U16);
+        break;
+    case PS_TYPE_U32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U32);
+        break;
+    case PS_TYPE_U64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,U64);
+        break;
+    case PS_TYPE_F32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,F32);
+        break;
+    case PS_TYPE_F64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,F64);
+        break;
+    case PS_TYPE_C32:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,C32);
+        break;
+    case PS_TYPE_C64:
+        PSIMAGE_ELEMENT_ASSIGN(output,input,C64);
+        break;
+    case PS_TYPE_PTR:
+        psError(__func__,"Can't copy image into a matrix of pointers.");
+        psImageFree(output);
+        return NULL;
+    }
+
+    return output;
+}
Index: /trunk/psLib/src/mathtypes/psImage.h
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.h	(revision 713)
+++ /trunk/psLib/src/mathtypes/psImage.h	(revision 714)
@@ -7,6 +7,6 @@
  *  @author Ross Harman, MHPCC
  *   
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-17 20:59:34 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:33:59 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -44,16 +44,16 @@
 
     union {
-        psU8    **u8;                   ///< unsigned 8-bit integer data.
-        psU16   **u16;                  ///< unsigned 16-bit integer data.
-        psU32   **u32;                  ///< unsigned 32-bit integer data.
-        psU32   **u64;                  ///< unsigned 64-bit integer data.
-        psS8    **s8;                   ///< signed 8-bit integer data.
-        psS16   **s16;                  ///< signed 16-bit integer data.
-        psS32   **s32;                  ///< signed 32-bit integer data.
-        psS32   **s64;                  ///< signed 64-bit integer data.
-        psF32   **f32;                  ///< single-precision float data.
-        psF64   **f64;                  ///< double-precision float data.
-        psC32   **c32;                  ///< single-precision complex data.
-        psC32   **c64;                  ///< double-precision complex data.
+        psU8    **U8;                   ///< unsigned 8-bit integer data.
+        psU16   **U16;                  ///< unsigned 16-bit integer data.
+        psU32   **U32;                  ///< unsigned 32-bit integer data.
+        psU64   **U64;                  ///< unsigned 64-bit integer data.
+        psS8    **S8;                   ///< signed 8-bit integer data.
+        psS16   **S16;                  ///< signed 16-bit integer data.
+        psS32   **S32;                  ///< signed 32-bit integer data.
+        psS64   **S64;                  ///< signed 64-bit integer data.
+        psF32   **F32;                  ///< single-precision float data.
+        psF64   **F64;                  ///< double-precision float data.
+        psC32   **C32;                  ///< single-precision complex data.
+        psC64   **C64;                  ///< double-precision complex data.
         void    **v;                    ///< void pointers to data
     } data;                             ///< Union for data types.
@@ -113,5 +113,5 @@
  */
 void psImageFreePixels(
-    psImage *restrict image             ///< psImage to free pixel memory from
+    psImage* restrict image             ///< psImage to free pixel memory from
 );
 
@@ -125,5 +125,16 @@
 );
 
-
+/** Makes a copy of a psImage
+ *
+ * return psImage*  Copy of the input psImage.  This may not be equal to the output parameter
+ *
+ */
+psImage *psImageCopy(
+    psImage* restrict output,
+    ///< if not NULL, a psImage that could be recycled.  If it can not be used, it will be freed via
+    ///< psImageFree
+    const psImage *input,               ///< the psImage to copy
+    psElemType type                     ///< the desired datatype of the returned copy
+);
 
 #endif
Index: /trunk/psLib/src/sys/psType.h
===================================================================
--- /trunk/psLib/src/sys/psType.h	(revision 713)
+++ /trunk/psLib/src/sys/psType.h	(revision 714)
@@ -19,6 +19,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-17 20:59:34 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:33:59 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -69,4 +69,17 @@
     PS_TYPE_COMPLEX_DOUBLE   = 0x810,   ///< Complex numbers consisting of double-precision floating point.
     PS_TYPE_PTR              = 0x000,   ///< Something else that's not supported for arithmetic.
+
+    PS_TYPE_S8               = 0x101,   ///< Character.
+    PS_TYPE_S16              = 0x102,   ///< Short integer.
+    PS_TYPE_S32              = 0x104,   ///< Integer.
+    PS_TYPE_S64              = 0x108,   ///< Long integer.
+    PS_TYPE_U8               = 0x301,   ///< Unsigned character.
+    PS_TYPE_U16              = 0x302,   ///< Unsigned short integer.
+    PS_TYPE_U32              = 0x304,   ///< Unsigned integer.
+    PS_TYPE_U64              = 0x308,   ///< Unsigned long integer.
+    PS_TYPE_F32              = 0x404,   ///< Single-precision Floating point.
+    PS_TYPE_F64              = 0x408,   ///< Double-precision floating point.
+    PS_TYPE_C32              = 0x808,   ///< Complex numbers consisting of single-precision floating point.
+    PS_TYPE_C64              = 0x810,   ///< Complex numbers consisting of double-precision floating point.
 } psElemType;
 
Index: /trunk/psLib/src/sysUtils/psType.h
===================================================================
--- /trunk/psLib/src/sysUtils/psType.h	(revision 713)
+++ /trunk/psLib/src/sysUtils/psType.h	(revision 714)
@@ -19,6 +19,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-17 20:59:34 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:33:59 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -69,4 +69,17 @@
     PS_TYPE_COMPLEX_DOUBLE   = 0x810,   ///< Complex numbers consisting of double-precision floating point.
     PS_TYPE_PTR              = 0x000,   ///< Something else that's not supported for arithmetic.
+
+    PS_TYPE_S8               = 0x101,   ///< Character.
+    PS_TYPE_S16              = 0x102,   ///< Short integer.
+    PS_TYPE_S32              = 0x104,   ///< Integer.
+    PS_TYPE_S64              = 0x108,   ///< Long integer.
+    PS_TYPE_U8               = 0x301,   ///< Unsigned character.
+    PS_TYPE_U16              = 0x302,   ///< Unsigned short integer.
+    PS_TYPE_U32              = 0x304,   ///< Unsigned integer.
+    PS_TYPE_U64              = 0x308,   ///< Unsigned long integer.
+    PS_TYPE_F32              = 0x404,   ///< Single-precision Floating point.
+    PS_TYPE_F64              = 0x408,   ///< Double-precision floating point.
+    PS_TYPE_C32              = 0x808,   ///< Complex numbers consisting of single-precision floating point.
+    PS_TYPE_C64              = 0x810,   ///< Complex numbers consisting of double-precision floating point.
 } psElemType;
 
Index: /trunk/psLib/test/collections/Makefile
===================================================================
--- /trunk/psLib/test/collections/Makefile	(revision 713)
+++ /trunk/psLib/test/collections/Makefile	(revision 714)
@@ -3,6 +3,6 @@
 ##  Makefile:   test/collections
 ##
-##  $Revision: 1.4 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-05-15 00:20:18 $
+##  $Revision: 1.5 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-05-18 02:34:00 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -46,4 +46,5 @@
 tst_psSort_03: tst_psSort_03.o
 tst_psSort_04: tst_psSort_04.o
+tst_psImage: tst_psImage.o
 
 clean:
Index: /trunk/psLib/test/image/tst_psImage.c
===================================================================
--- /trunk/psLib/test/image/tst_psImage.c	(revision 713)
+++ /trunk/psLib/test/image/tst_psImage.c	(revision 714)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-15 00:16:31 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:34:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -116,10 +116,10 @@
                     for (int r=0;r<rows;r++) {
                         for (int c=0;c<cols;c++) {
-                            image->data.ui16[r][c] = 2*c+r;
-                        }
-                    }
-                    for (int r=0;r<rows;r++) {
-                        for (int c=0;c<cols;c++) {
-                            if (image->data.ui16[r][c] != 2*c+r) {
+                            image->data.U16[r][c] = 2*c+r;
+                        }
+                    }
+                    for (int r=0;r<rows;r++) {
+                        for (int c=0;c<cols;c++) {
+                            if (image->data.U16[r][c] != 2*c+r) {
                                 psError(__func__,"Could not set all pixels in uint16 image at (%d,%d)",c,r);
                                 psImageFree(image);
@@ -136,10 +136,10 @@
                     for (int r=0;r<rows;r++) {
                         for (int c=0;c<cols;c++) {
-                            image->data.f32[r][c] = 2.0f*c+r;
-                        }
-                    }
-                    for (int r=0;r<rows;r++) {
-                        for (int c=0;c<cols;c++) {
-                            if (fabsf(image->data.f32[r][c] - (2.0f*c+r)) > FLT_EPSILON) {
+                            image->data.F32[r][c] = 2.0f*c+r;
+                        }
+                    }
+                    for (int r=0;r<rows;r++) {
+                        for (int c=0;c<cols;c++) {
+                            if (fabsf(image->data.F32[r][c] - (2.0f*c+r)) > FLT_EPSILON) {
                                 psError(__func__,"Could not set all pixels in float image at (%d,%d)",c,r);
                                 psImageFree(image);
@@ -156,10 +156,10 @@
                     for (int r=0;r<rows;r++) {
                         for (int c=0;c<cols;c++) {
-                            image->data.f64[r][c] = 2.0f*c+r;
-                        }
-                    }
-                    for (int r=0;r<rows;r++) {
-                        for (int c=0;c<cols;c++) {
-                            if (fabs(image->data.f64[r][c] - (2.0f*c+r)) > DBL_EPSILON) {
+                            image->data.F64[r][c] = 2.0f*c+r;
+                        }
+                    }
+                    for (int r=0;r<rows;r++) {
+                        for (int c=0;c<cols;c++) {
+                            if (fabs(image->data.F64[r][c] - (2.0f*c+r)) > DBL_EPSILON) {
                                 psError(__func__,"Could not set all pixels in double image at (%d,%d)",c,r);
                                 psImageFree(image);
@@ -176,11 +176,11 @@
                     for (int r=0;r<rows;r++) {
                         for (int c=0;c<cols;c++) {
-                            image->data.c32[r][c] = r + I * c;
-                        }
-                    }
-                    for (int r=0;r<rows;r++) {
-                        for (int c=0;c<cols;c++) {
-                            if (fabsf(crealf(image->data.c32[r][c]) - r) > FLT_EPSILON ||
-                                    fabsf(cimagf(image->data.c32[r][c]) - c) > FLT_EPSILON ) {
+                            image->data.C32[r][c] = r + I * c;
+                        }
+                    }
+                    for (int r=0;r<rows;r++) {
+                        for (int c=0;c<cols;c++) {
+                            if (fabsf(crealf(image->data.C32[r][c]) - r) > FLT_EPSILON ||
+                                    fabsf(cimagf(image->data.C32[r][c]) - c) > FLT_EPSILON ) {
                                 psError(__func__,"Could not set all pixels in complex image at (%d,%d)",c,r);
                                 psImageFree(image);
@@ -198,10 +198,10 @@
                     for (int r=0;r<rows;r++) {
                         for (int c=0;c<cols;c++) {
-                            image->data.ui8[r][c] = (uint8_t)(r + c);
-                        }
-                    }
-                    for (int r=0;r<rows;r++) {
-                        for (int c=0;c<cols;c++) {
-                            if (image->data.ui8[r][c] != (uint8_t)(r + c)) {
+                            image->data.U8[r][c] = (uint8_t)(r + c);
+                        }
+                    }
+                    for (int r=0;r<rows;r++) {
+                        for (int c=0;c<cols;c++) {
+                            if (image->data.U8[r][c] != (uint8_t)(r + c)) {
                                 psError(__func__,"Could not set all pixels in image (type=%d) at (%d,%d)",
                                         type[t],c,r);
Index: /trunk/psLib/test/sysUtils/tst_psMemory.c
===================================================================
--- /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 713)
+++ /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 714)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-05-12 19:04:26 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-05-18 02:34:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -170,5 +170,5 @@
     cb = psMemExhaustedCallbackSet(TPOutOfMemoryExhaustedCallback);
 
-    mem = (int*) psAlloc(LONG_MAX);
+    mem = (int*) psAlloc(ULONG_MAX);
 
     psMemExhaustedCallbackSet(cb);
