Index: /trunk/psLib/src/collections/psVector.c
===================================================================
--- /trunk/psLib/src/collections/psVector.c	(revision 3785)
+++ /trunk/psLib/src/collections/psVector.c	(revision 3786)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-04-21 21:21:01 $
+*  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-04-29 02:25:09 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -526,2 +526,14 @@
     }
 }
+
+bool p_psVectorPrint (FILE *f, psVector *a, char *name)
+{
+
+    fprintf (f, "vector: %s\n", name);
+
+    for (int i = 0; i < a[0].n; i++) {
+        fprintf (f, "%f\n", p_psVectorGetElementF64(a, i));
+    }
+    fprintf (f, "\n");
+    return (true);
+}
Index: /trunk/psLib/src/collections/psVector.h
===================================================================
--- /trunk/psLib/src/collections/psVector.h	(revision 3785)
+++ /trunk/psLib/src/collections/psVector.h	(revision 3786)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-21 21:18:23 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:09 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,6 @@
 #ifndef PS_VECTOR_H
 #define PS_VECTOR_H
+
+#include<stdio.h>
 
 #include "psType.h"
@@ -162,4 +164,13 @@
 );
 
+/** Print a vector to a stream
+ *
+ *  @return psBool          TRUE is successful, otherwise FALSE.
+ */
+bool p_psVectorPrint (
+    FILE *f,                           ///< output stream
+    psVector *a,                       ///< vector to print
+    char *name                         ///< name of vector (for title)
+);
 
 /// @}
Index: /trunk/psLib/src/image/psImage.c
===================================================================
--- /trunk/psLib/src/image/psImage.c	(revision 3785)
+++ /trunk/psLib/src/image/psImage.c	(revision 3786)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-15 00:12:08 $
+ *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -589,4 +589,53 @@
 
     return unexposedValue;
+}
+
+psF64 p_psImageGetElementF64(psImage* image,
+                             int col,
+                             int row)
+{
+    if (image == NULL) {
+        return NAN;
+    }
+    if (col < 0 || col >= image->numCols) {
+        return NAN;
+    }
+    if (row < 0 || row >= image->numRows) {
+        return NAN;
+    }
+
+    switch (image->type.type) {
+    case PS_TYPE_U8:
+        return image->data.U8[row][col];
+        break;
+    case PS_TYPE_U16:
+        return image->data.U16[row][col];
+        break;
+    case PS_TYPE_U32:
+        return image->data.U32[row][col];
+        break;
+    case PS_TYPE_U64:
+        return image->data.U64[row][col];
+        break;
+    case PS_TYPE_S8:
+        return image->data.S8[row][col];
+        break;
+    case PS_TYPE_S16:
+        return image->data.S16[row][col];
+        break;
+    case PS_TYPE_S32:
+        return image->data.S32[row][col];
+        break;
+    case PS_TYPE_S64:
+        return image->data.S64[row][col];
+        break;
+    case PS_TYPE_F32:
+        return image->data.F32[row][col];
+        break;
+    case PS_TYPE_F64:
+        return image->data.F64[row][col];
+    default:
+        return NAN;
+    }
 }
 
Index: /trunk/psLib/src/image/psImage.h
===================================================================
--- /trunk/psLib/src/image/psImage.h	(revision 3785)
+++ /trunk/psLib/src/image/psImage.h	(revision 3786)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-15 00:12:08 $
+ *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -182,4 +182,14 @@
 );
 
+/** get an element of an image as a psF64.
+ *
+ *  @return psF64   pixel value at specified location
+ */
+psF64 p_psImageGetElementF64(
+    psImage* image,                    ///< input image
+    int col,                           ///< pixel column
+    int row                            ///< pixel row
+);
+
 /** Interpolate image pixel value given floating point coordinates.
  *
@@ -225,5 +235,5 @@
 PIXEL_INTERPOLATE_FCNS(BILINEAR)
 PIXEL_INTERPOLATE_FCNS(BILINEAR_VARIANCE)
-#endif
+#endif // ! SWIG
 
 #undef PIXEL_INTERPOLATE_FCN_PROTOTYPE
@@ -232,3 +242,3 @@
 /// @}
 
-#endif
+#endif // PS_IMAGE_H
Index: /trunk/psLib/src/image/psImageIO.c
===================================================================
--- /trunk/psLib/src/image/psImageIO.c	(revision 3785)
+++ /trunk/psLib/src/image/psImageIO.c	(revision 3786)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-17 19:26:24 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -419,2 +419,18 @@
     return true;
 }
+
+bool p_psImagePrint (FILE *f, psImage *a, char *name)
+{
+
+    fprintf (f, "matrix: %s\n", name);
+
+    for (int j = 0; j < a[0].numRows; j++) {
+        for (int i = 0; i < a[0].numCols; i++) {
+            fprintf (f, "%f  ", p_psImageGetElementF64(a, i, j));
+        }
+        fprintf (f, "\n");
+    }
+    fprintf (f, "\n");
+    return (true);
+}
+
Index: /trunk/psLib/src/image/psImageIO.h
===================================================================
--- /trunk/psLib/src/image/psImageIO.h	(revision 3785)
+++ /trunk/psLib/src/image/psImageIO.h	(revision 3786)
@@ -10,6 +10,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-17 19:26:24 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -92,5 +92,15 @@
 );
 
+/** print image pixel values.
+ *
+ *  @return bool    TRUE is successful, otherwise FALSE.
+ */
+bool p_psImagePrint(
+    FILE *f,                           ///< Destination stream
+    psImage *a,                        ///< image to print
+    char *name                         ///< name of the image (for title)
+);
+
 /// @}
 
-#endif
+#endif // PS_IMAGEIO_H
Index: /trunk/psLib/src/mathtypes/psImage.c
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.c	(revision 3785)
+++ /trunk/psLib/src/mathtypes/psImage.c	(revision 3786)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-15 00:12:08 $
+ *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -589,4 +589,53 @@
 
     return unexposedValue;
+}
+
+psF64 p_psImageGetElementF64(psImage* image,
+                             int col,
+                             int row)
+{
+    if (image == NULL) {
+        return NAN;
+    }
+    if (col < 0 || col >= image->numCols) {
+        return NAN;
+    }
+    if (row < 0 || row >= image->numRows) {
+        return NAN;
+    }
+
+    switch (image->type.type) {
+    case PS_TYPE_U8:
+        return image->data.U8[row][col];
+        break;
+    case PS_TYPE_U16:
+        return image->data.U16[row][col];
+        break;
+    case PS_TYPE_U32:
+        return image->data.U32[row][col];
+        break;
+    case PS_TYPE_U64:
+        return image->data.U64[row][col];
+        break;
+    case PS_TYPE_S8:
+        return image->data.S8[row][col];
+        break;
+    case PS_TYPE_S16:
+        return image->data.S16[row][col];
+        break;
+    case PS_TYPE_S32:
+        return image->data.S32[row][col];
+        break;
+    case PS_TYPE_S64:
+        return image->data.S64[row][col];
+        break;
+    case PS_TYPE_F32:
+        return image->data.F32[row][col];
+        break;
+    case PS_TYPE_F64:
+        return image->data.F64[row][col];
+    default:
+        return NAN;
+    }
 }
 
Index: /trunk/psLib/src/mathtypes/psImage.h
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.h	(revision 3785)
+++ /trunk/psLib/src/mathtypes/psImage.h	(revision 3786)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-15 00:12:08 $
+ *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -182,4 +182,14 @@
 );
 
+/** get an element of an image as a psF64.
+ *
+ *  @return psF64   pixel value at specified location
+ */
+psF64 p_psImageGetElementF64(
+    psImage* image,                    ///< input image
+    int col,                           ///< pixel column
+    int row                            ///< pixel row
+);
+
 /** Interpolate image pixel value given floating point coordinates.
  *
@@ -225,5 +235,5 @@
 PIXEL_INTERPOLATE_FCNS(BILINEAR)
 PIXEL_INTERPOLATE_FCNS(BILINEAR_VARIANCE)
-#endif
+#endif // ! SWIG
 
 #undef PIXEL_INTERPOLATE_FCN_PROTOTYPE
@@ -232,3 +242,3 @@
 /// @}
 
-#endif
+#endif // PS_IMAGE_H
Index: /trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.c	(revision 3785)
+++ /trunk/psLib/src/mathtypes/psVector.c	(revision 3786)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-04-21 21:21:01 $
+*  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-04-29 02:25:09 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -526,2 +526,14 @@
     }
 }
+
+bool p_psVectorPrint (FILE *f, psVector *a, char *name)
+{
+
+    fprintf (f, "vector: %s\n", name);
+
+    for (int i = 0; i < a[0].n; i++) {
+        fprintf (f, "%f\n", p_psVectorGetElementF64(a, i));
+    }
+    fprintf (f, "\n");
+    return (true);
+}
Index: /trunk/psLib/src/mathtypes/psVector.h
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.h	(revision 3785)
+++ /trunk/psLib/src/mathtypes/psVector.h	(revision 3786)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-21 21:18:23 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-29 02:25:09 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,6 @@
 #ifndef PS_VECTOR_H
 #define PS_VECTOR_H
+
+#include<stdio.h>
 
 #include "psType.h"
@@ -162,4 +164,13 @@
 );
 
+/** Print a vector to a stream
+ *
+ *  @return psBool          TRUE is successful, otherwise FALSE.
+ */
+bool p_psVectorPrint (
+    FILE *f,                           ///< output stream
+    psVector *a,                       ///< vector to print
+    char *name                         ///< name of vector (for title)
+);
 
 /// @}
