Index: /trunk/psLib/src/collections/Makefile
===================================================================
--- /trunk/psLib/src/collections/Makefile	(revision 1204)
+++ /trunk/psLib/src/collections/Makefile	(revision 1205)
@@ -3,6 +3,6 @@
 ##  Makefile:   collections
 ##
-##  $Revision: 1.22 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-06-28 20:36:37 $
+##  $Revision: 1.23 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-07-09 21:48:07 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,7 +41,4 @@
 
 all: $(TARGET_STATIC)
-
-# force the creation of a psImage.i for psImage.o (to expand macros).
-psImage.o: psImage.i
 
 # Rule to make static library
Index: /trunk/psLib/src/dataManip/Makefile
===================================================================
--- /trunk/psLib/src/dataManip/Makefile	(revision 1204)
+++ /trunk/psLib/src/dataManip/Makefile	(revision 1205)
@@ -14,5 +14,6 @@
            psFFT.o \
            psImageIO.o \
-           psMinimize.o
+           psMinimize.o \
+           psImageManip.o
 
 all: $(TARGET_STATIC)
Index: /trunk/psLib/src/image/psImage.c
===================================================================
--- /trunk/psLib/src/image/psImage.c	(revision 1204)
+++ /trunk/psLib/src/image/psImage.c	(revision 1205)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-08 01:05:00 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-09 21:48:07 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -400,221 +400,2 @@
 }
 
-int psImageClip(psImage* input,float min,float vmin,float max,float vmax)
-{
-    int numClipped = 0;
-    unsigned int numRows;
-    unsigned int numCols;
-
-    if (input == NULL) {
-        return 0;
-    }
-
-    if (max < min) {
-        psError(__func__,"psImageClip can not be invoked with max < min.");
-        return 0;
-    }
-
-    numRows = input->numRows;
-    numCols = input->numCols;
-
-    switch (input->type.type) {
-
-        #define psImageClipCase(type)\
-    case PS_TYPE_##type: { \
-            ps##type minimum = (ps##type) min; \
-            ps##type maximum = (ps##type) max; \
-            for (unsigned int row = 0;row<numRows;row++) { \
-                ps##type* inputRow = input->data.type[row]; \
-                for (unsigned int col = 0; col < numCols; col++) { \
-                    if (inputRow[col] < minimum) { \
-                        inputRow[col] = (ps##type)vmin; \
-                        numClipped++; \
-                    } else if (inputRow[col] > maximum) { \
-                        inputRow[col] = (ps##type)vmax; \
-                        numClipped++; \
-                    } \
-                } \
-            } \
-        } \
-        break;
-        #define psImageClipCaseComplex(type)\
-    case PS_TYPE_##type: { \
-            for (unsigned int row = 0;row<numRows;row++) { \
-                ps##type* inputRow = input->data.type[row]; \
-                for (unsigned int col = 0; col < numCols; col++) { \
-                    if (cabsf(inputRow[col]) < min) { \
-                        inputRow[col] = (ps##type)vmin; \
-                        numClipped++; \
-                    } else if (cabsf(inputRow[col]) > max) { \
-                        inputRow[col] = (ps##type)vmax; \
-                        numClipped++; \
-                    } \
-                } \
-            } \
-        } \
-        break;
-
-        psImageClipCase(S8)
-        psImageClipCase(S16)
-        psImageClipCase(S32)
-        psImageClipCase(S64)
-        psImageClipCase(U8)
-        psImageClipCase(U16)
-        psImageClipCase(U32)
-        psImageClipCase(U64)
-        psImageClipCase(F32)
-        psImageClipCase(F64)
-        psImageClipCaseComplex(C32)
-        psImageClipCaseComplex(C64)
-
-    default:
-        psError(__func__,"psImageClip does not support the given datatype (%d)",
-                input->type.type);
-    }
-
-    return numClipped;
-}
-
-int psImageClipNaN(psImage* input,float value)
-{
-    int numClipped = 0;
-    unsigned int numRows;
-    unsigned int numCols;
-
-    if (input == NULL) {
-        return 0;
-    }
-    numRows = input->numRows;
-    numCols = input->numCols;
-
-    switch (input->type.type) {
-
-        #define psImageClipNaNCase(type) \
-    case PS_TYPE_##type: \
-        for (unsigned int row = 0;row<numRows;row++) { \
-            ps##type* inputRow = input->data.type[row]; \
-            for (unsigned int col = 0; col < numCols; col++) { \
-                if (! isfinite(inputRow[col])) { \
-                    inputRow[col] = (ps##type)value; \
-                    numClipped++; \
-                } \
-            } \
-        } \
-        break;
-
-        psImageClipNaNCase(F32)
-        psImageClipNaNCase(F64)
-        psImageClipNaNCase(C32)
-        psImageClipNaNCase(C64)
-
-    default:
-        psError(__func__,"psImageClip does not support the given datatype (%d)",
-                input->type.type);
-    }
-
-    return numClipped;
-}
-
-int psImageOverlaySection(psImage* image, const psImage* overlay, int col0,
-                          int row0, const char* op)
-{
-    unsigned int imageNumRows;
-    unsigned int imageNumCols;
-    unsigned int overlayNumRows;
-    unsigned int overlayNumCols;
-    unsigned int imageRowLimit;
-    unsigned int imageColLimit;
-    psElemType  type;
-
-    if (image == NULL || overlay == NULL) {
-        psError(__func__,"one of the input images was NULL.");
-        return 1;
-    }
-
-    if (op == NULL) {
-        psError(__func__,"Operation can not be NULL.");
-        return 1;
-    }
-
-    type = image->type.type;
-
-    if (type != overlay->type.type) {
-        psError(__func__,"Image and overlay datatypes must match. (%d vs %d)",
-                type,overlay->type.type);
-        return 2;
-    }
-
-    imageNumRows = image->numRows;
-    imageNumCols = image->numCols;
-    overlayNumRows = overlay->numRows;
-    overlayNumCols = overlay->numCols;
-
-    /* check row0/col0 to see if it is within the image size */
-    if (row0 < 0 || col0 < 0 || row0 >= imageNumRows || col0 >= imageNumCols) {
-        psError(__func__, "Overlay origin of (%d,%d) is outside of the image dimensions (%d x %d).",
-                col0, row0, imageNumCols, imageNumRows);
-        return 3;
-    }
-
-    /* check if overlay is totally withing input image */
-    imageRowLimit = row0+overlayNumRows;
-    imageColLimit = col0+overlayNumCols;
-    if (imageRowLimit > imageNumRows || imageColLimit > imageNumCols) {
-        psError(__func__, "Overlay image (%d,%d -> %d,%d) is partially outside"
-                " of the input image (%d x %d).",
-                col0, row0, col0+overlayNumCols-1, row0+overlayNumRows-1,
-                imageNumCols,imageNumRows);
-        return 4;
-    }
-
-    switch (type) {
-
-        #define psImageOverlayCase(DATATYPE) \
-    case PS_TYPE_##DATATYPE: \
-        for (unsigned int row=row0;row<imageRowLimit;row++) { \
-            ps##DATATYPE* imageRow = image->data.DATATYPE[row]; \
-            ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row-row0]; \
-            for (unsigned int col=col0;col<imageColLimit;col++) { \
-                switch (*op) { \
-                case '+': \
-                    imageRow[col] += overlayRow[col-col0]; \
-                    break; \
-                case '-': \
-                    imageRow[col] -= overlayRow[col-col0]; \
-                    break; \
-                case '*': \
-                    imageRow[col] *= overlayRow[col-col0]; \
-                    break; \
-                case '/': \
-                    imageRow[col] /= overlayRow[col-col0]; \
-                    break; \
-                case '=': \
-                    imageRow[col] = overlayRow[col-col0]; \
-                    break; \
-                default: \
-                    psError(__func__,"Unknown operation %s",op); \
-                    return 5; \
-                } \
-            } \
-        } \
-        break;
-
-        psImageOverlayCase(U8);
-        psImageOverlayCase(U16);
-        psImageOverlayCase(U32);
-        psImageOverlayCase(U64);
-        psImageOverlayCase(S8);
-        psImageOverlayCase(S16);
-        psImageOverlayCase(S32);
-        psImageOverlayCase(S64);
-        psImageOverlayCase(F32);
-        psImageOverlayCase(F64);
-        psImageOverlayCase(C32);
-        psImageOverlayCase(C64);
-
-    default:
-        psError(__func__,"Can not operate on type %d.",type);
-    }
-
-    return 0;
-}
Index: /trunk/psLib/src/image/psImage.h
===================================================================
--- /trunk/psLib/src/image/psImage.h	(revision 1204)
+++ /trunk/psLib/src/image/psImage.h	(revision 1205)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-23 23:00:15 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-09 21:48:07 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -137,51 +137,4 @@
 );
 
-/** Clip image values outside of tange to given values
- *
- *  All pixels with values less than min are set to the value vmin.  all pixels
- *  with values greater than max are set to the value vmax. This function is
- *  defined for psU8, psU16, psS8, psS16, psF32, psF64, psC32, and psC64.
- *
- *  @return int     The number of clipped pixels
- */
-int psImageClip(
-    psImage* input,                 ///< the image to clip
-    psF32 min,                      ///< the minimum image value allowed
-    psF32 vmin,                     ///< the value pixels < min are set to
-    psF32 max,                      ///< the maximum image value allowed
-    psF32 vmax                      ///< the value pixels > max are set to
-);
-
-/** Clip NaN image pixels to given value.
- *
- *  Pixels with NaN, +Inf, or -Inf values are set to the specified value. This
- *  function is defined for psF32, psF64, psC32, and psC64.
- *
- *  @return int     The number of clipped pixels
- */
-int psImageClipNaN(
-    psImage* input,                 ///< the image to clip
-    psF32 value                     ///< the value to set all NaN/Inf values to
-);
-
-/** Overlay subregion of image with another image
- *
- *  Replace the pixels in the image which correspond to the pixels in OVERLAY
- *  with values derived from the IMAGE and OVERLAY based on the given operator
- *  OP.  Valid operators are "=" (set image value to OVERLAY value), "+" (add
- *  OVERLAY value to image value), "-" (subtract OVERLAY from image), "*"
- *  (multiply OVERLAY times image), "/" (divide image by OVERLAY).  This
- *  function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
- *
- *  @return int         0 if success, non-zero if failed.
- */
-int psImageOverlaySection(
-    psImage* image,                 ///< target image
-    const psImage* overlay,         ///< the overlay image
-    int col0,                       ///< the column to start overlay
-    int row0,                       ///< the row to start overlay
-    const char* op                  ///< the operation to perform for overlay
-);
-
 /// @}
 
Index: /trunk/psLib/src/image/psImageManip.c
===================================================================
--- /trunk/psLib/src/image/psImageManip.c	(revision 1205)
+++ /trunk/psLib/src/image/psImageManip.c	(revision 1205)
@@ -0,0 +1,241 @@
+/** @file  psImageManip.c
+ *
+ *  @brief Contains basic image pixel and geometry manipulation operations, as
+ *         specified in the PSLIB SDRS sections "Image Pixel Manipulations" and
+ *         "Image Geometry Manipulations".
+ *
+ *  @ingroup Image
+ *
+ *  @author Robert DeSonia, MHPCC
+ *  @author Ross Harman, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-09 21:48:07 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
+#include <math.h>                      // for isfinite(), etc.
+#include <stdlib.h>
+
+#include "psError.h"
+#include "psImage.h"
+
+int psImageClip(psImage* input,float min,float vmin,float max,float vmax)
+{
+    int numClipped = 0;
+    unsigned int numRows;
+    unsigned int numCols;
+
+    if (input == NULL) {
+        return 0;
+    }
+
+    if (max < min) {
+        psError(__func__,"psImageClip can not be invoked with max < min.");
+        return 0;
+    }
+
+    numRows = input->numRows;
+    numCols = input->numCols;
+
+    switch (input->type.type) {
+
+        #define psImageClipCase(type)\
+    case PS_TYPE_##type: { \
+            ps##type minimum = (ps##type) min; \
+            ps##type maximum = (ps##type) max; \
+            for (unsigned int row = 0;row<numRows;row++) { \
+                ps##type* inputRow = input->data.type[row]; \
+                for (unsigned int col = 0; col < numCols; col++) { \
+                    if (inputRow[col] < minimum) { \
+                        inputRow[col] = (ps##type)vmin; \
+                        numClipped++; \
+                    } else if (inputRow[col] > maximum) { \
+                        inputRow[col] = (ps##type)vmax; \
+                        numClipped++; \
+                    } \
+                } \
+            } \
+        } \
+        break;
+        #define psImageClipCaseComplex(type)\
+    case PS_TYPE_##type: { \
+            for (unsigned int row = 0;row<numRows;row++) { \
+                ps##type* inputRow = input->data.type[row]; \
+                for (unsigned int col = 0; col < numCols; col++) { \
+                    if (cabsf(inputRow[col]) < min) { \
+                        inputRow[col] = (ps##type)vmin; \
+                        numClipped++; \
+                    } else if (cabsf(inputRow[col]) > max) { \
+                        inputRow[col] = (ps##type)vmax; \
+                        numClipped++; \
+                    } \
+                } \
+            } \
+        } \
+        break;
+
+        psImageClipCase(S8)
+        psImageClipCase(S16)
+        psImageClipCase(S32)
+        psImageClipCase(S64)
+        psImageClipCase(U8)
+        psImageClipCase(U16)
+        psImageClipCase(U32)
+        psImageClipCase(U64)
+        psImageClipCase(F32)
+        psImageClipCase(F64)
+        psImageClipCaseComplex(C32)
+        psImageClipCaseComplex(C64)
+
+    default:
+        psError(__func__,"psImageClip does not support the given datatype (%d)",
+                input->type.type);
+    }
+
+    return numClipped;
+}
+
+int psImageClipNaN(psImage* input,float value)
+{
+    int numClipped = 0;
+    unsigned int numRows;
+    unsigned int numCols;
+
+    if (input == NULL) {
+        return 0;
+    }
+    numRows = input->numRows;
+    numCols = input->numCols;
+
+    switch (input->type.type) {
+
+        #define psImageClipNaNCase(type) \
+    case PS_TYPE_##type: \
+        for (unsigned int row = 0;row<numRows;row++) { \
+            ps##type* inputRow = input->data.type[row]; \
+            for (unsigned int col = 0; col < numCols; col++) { \
+                if (! isfinite(inputRow[col])) { \
+                    inputRow[col] = (ps##type)value; \
+                    numClipped++; \
+                } \
+            } \
+        } \
+        break;
+
+        psImageClipNaNCase(F32)
+        psImageClipNaNCase(F64)
+        psImageClipNaNCase(C32)
+        psImageClipNaNCase(C64)
+
+    default:
+        psError(__func__,"psImageClip does not support the given datatype (%d)",
+                input->type.type);
+    }
+
+    return numClipped;
+}
+
+int psImageOverlaySection(psImage* image, const psImage* overlay, int col0,
+                          int row0, const char* op)
+{
+    unsigned int imageNumRows;
+    unsigned int imageNumCols;
+    unsigned int overlayNumRows;
+    unsigned int overlayNumCols;
+    unsigned int imageRowLimit;
+    unsigned int imageColLimit;
+    psElemType  type;
+
+    if (image == NULL || overlay == NULL) {
+        psError(__func__,"one of the input images was NULL.");
+        return 1;
+    }
+
+    if (op == NULL) {
+        psError(__func__,"Operation can not be NULL.");
+        return 1;
+    }
+
+    type = image->type.type;
+
+    if (type != overlay->type.type) {
+        psError(__func__,"Image and overlay datatypes must match. (%d vs %d)",
+                type,overlay->type.type);
+        return 2;
+    }
+
+    imageNumRows = image->numRows;
+    imageNumCols = image->numCols;
+    overlayNumRows = overlay->numRows;
+    overlayNumCols = overlay->numCols;
+
+    /* check row0/col0 to see if it is within the image size */
+    if (row0 < 0 || col0 < 0 || row0 >= imageNumRows || col0 >= imageNumCols) {
+        psError(__func__, "Overlay origin of (%d,%d) is outside of the image dimensions (%d x %d).",
+                col0, row0, imageNumCols, imageNumRows);
+        return 3;
+    }
+
+    /* check if overlay is totally withing input image */
+    imageRowLimit = row0+overlayNumRows;
+    imageColLimit = col0+overlayNumCols;
+    if (imageRowLimit > imageNumRows || imageColLimit > imageNumCols) {
+        psError(__func__, "Overlay image (%d,%d -> %d,%d) is partially outside"
+                " of the input image (%d x %d).",
+                col0, row0, col0+overlayNumCols-1, row0+overlayNumRows-1,
+                imageNumCols,imageNumRows);
+        return 4;
+    }
+
+    switch (type) {
+
+        #define psImageOverlayCase(DATATYPE) \
+    case PS_TYPE_##DATATYPE: \
+        for (unsigned int row=row0;row<imageRowLimit;row++) { \
+            ps##DATATYPE* imageRow = image->data.DATATYPE[row]; \
+            ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row-row0]; \
+            for (unsigned int col=col0;col<imageColLimit;col++) { \
+                switch (*op) { \
+                case '+': \
+                    imageRow[col] += overlayRow[col-col0]; \
+                    break; \
+                case '-': \
+                    imageRow[col] -= overlayRow[col-col0]; \
+                    break; \
+                case '*': \
+                    imageRow[col] *= overlayRow[col-col0]; \
+                    break; \
+                case '/': \
+                    imageRow[col] /= overlayRow[col-col0]; \
+                    break; \
+                case '=': \
+                    imageRow[col] = overlayRow[col-col0]; \
+                    break; \
+                default: \
+                    psError(__func__,"Unknown operation %s",op); \
+                    return 5; \
+                } \
+            } \
+        } \
+        break;
+
+        psImageOverlayCase(U8);
+        psImageOverlayCase(U16);
+        psImageOverlayCase(U32);
+        psImageOverlayCase(U64);
+        psImageOverlayCase(S8);
+        psImageOverlayCase(S16);
+        psImageOverlayCase(S32);
+        psImageOverlayCase(S64);
+        psImageOverlayCase(F32);
+        psImageOverlayCase(F64);
+        psImageOverlayCase(C32);
+        psImageOverlayCase(C64);
+
+    default:
+        psError(__func__,"Can not operate on type %d.",type);
+    }
+
+    return 0;
+}
Index: /trunk/psLib/src/image/psImageManip.h
===================================================================
--- /trunk/psLib/src/image/psImageManip.h	(revision 1205)
+++ /trunk/psLib/src/image/psImageManip.h	(revision 1205)
@@ -0,0 +1,73 @@
+/** @file  psImageManip.h
+ *
+ *  @brief Contains basic image pixel and geometry manipulation operations, as
+ *         specified in the PSLIB SDRS sections "Image Pixel Manipulations" and
+ *         "Image Geometry Manipulations".
+ *
+ *  @ingroup Image
+ *
+ *  @author Robert DeSonia, MHPCC
+ *  @author Ross Harman, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-09 21:48:07 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
+# ifndef PS_IMAGE_MANIP_H
+# define PS_IMAGE_MANIP_H
+
+#include "psImage.h"
+
+/// @addtogroup Image
+/// @{
+
+/** Clip image values outside of tange to given values
+ *
+ *  All pixels with values less than min are set to the value vmin.  all pixels
+ *  with values greater than max are set to the value vmax. This function is
+ *  defined for psU8, psU16, psS8, psS16, psF32, psF64, psC32, and psC64.
+ *
+ *  @return int     The number of clipped pixels
+ */
+int psImageClip(
+    psImage* input,                 ///< the image to clip
+    psF32 min,                      ///< the minimum image value allowed
+    psF32 vmin,                     ///< the value pixels < min are set to
+    psF32 max,                      ///< the maximum image value allowed
+    psF32 vmax                      ///< the value pixels > max are set to
+);
+
+/** Clip NaN image pixels to given value.
+ *
+ *  Pixels with NaN, +Inf, or -Inf values are set to the specified value. This
+ *  function is defined for psF32, psF64, psC32, and psC64.
+ *
+ *  @return int     The number of clipped pixels
+ */
+int psImageClipNaN(
+    psImage* input,                 ///< the image to clip
+    psF32 value                     ///< the value to set all NaN/Inf values to
+);
+
+/** Overlay subregion of image with another image
+ *
+ *  Replace the pixels in the image which correspond to the pixels in OVERLAY
+ *  with values derived from the IMAGE and OVERLAY based on the given operator
+ *  OP.  Valid operators are "=" (set image value to OVERLAY value), "+" (add
+ *  OVERLAY value to image value), "-" (subtract OVERLAY from image), "*"
+ *  (multiply OVERLAY times image), "/" (divide image by OVERLAY).  This
+ *  function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
+ *
+ *  @return int         0 if success, non-zero if failed.
+ */
+int psImageOverlaySection(
+    psImage* image,                 ///< target image
+    const psImage* overlay,         ///< the overlay image
+    int col0,                       ///< the column to start overlay
+    int row0,                       ///< the row to start overlay
+    const char* op                  ///< the operation to perform for overlay
+);
+
+
+#endif
Index: /trunk/psLib/src/mathtypes/psImage.c
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.c	(revision 1204)
+++ /trunk/psLib/src/mathtypes/psImage.c	(revision 1205)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-08 01:05:00 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-09 21:48:07 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -400,221 +400,2 @@
 }
 
-int psImageClip(psImage* input,float min,float vmin,float max,float vmax)
-{
-    int numClipped = 0;
-    unsigned int numRows;
-    unsigned int numCols;
-
-    if (input == NULL) {
-        return 0;
-    }
-
-    if (max < min) {
-        psError(__func__,"psImageClip can not be invoked with max < min.");
-        return 0;
-    }
-
-    numRows = input->numRows;
-    numCols = input->numCols;
-
-    switch (input->type.type) {
-
-        #define psImageClipCase(type)\
-    case PS_TYPE_##type: { \
-            ps##type minimum = (ps##type) min; \
-            ps##type maximum = (ps##type) max; \
-            for (unsigned int row = 0;row<numRows;row++) { \
-                ps##type* inputRow = input->data.type[row]; \
-                for (unsigned int col = 0; col < numCols; col++) { \
-                    if (inputRow[col] < minimum) { \
-                        inputRow[col] = (ps##type)vmin; \
-                        numClipped++; \
-                    } else if (inputRow[col] > maximum) { \
-                        inputRow[col] = (ps##type)vmax; \
-                        numClipped++; \
-                    } \
-                } \
-            } \
-        } \
-        break;
-        #define psImageClipCaseComplex(type)\
-    case PS_TYPE_##type: { \
-            for (unsigned int row = 0;row<numRows;row++) { \
-                ps##type* inputRow = input->data.type[row]; \
-                for (unsigned int col = 0; col < numCols; col++) { \
-                    if (cabsf(inputRow[col]) < min) { \
-                        inputRow[col] = (ps##type)vmin; \
-                        numClipped++; \
-                    } else if (cabsf(inputRow[col]) > max) { \
-                        inputRow[col] = (ps##type)vmax; \
-                        numClipped++; \
-                    } \
-                } \
-            } \
-        } \
-        break;
-
-        psImageClipCase(S8)
-        psImageClipCase(S16)
-        psImageClipCase(S32)
-        psImageClipCase(S64)
-        psImageClipCase(U8)
-        psImageClipCase(U16)
-        psImageClipCase(U32)
-        psImageClipCase(U64)
-        psImageClipCase(F32)
-        psImageClipCase(F64)
-        psImageClipCaseComplex(C32)
-        psImageClipCaseComplex(C64)
-
-    default:
-        psError(__func__,"psImageClip does not support the given datatype (%d)",
-                input->type.type);
-    }
-
-    return numClipped;
-}
-
-int psImageClipNaN(psImage* input,float value)
-{
-    int numClipped = 0;
-    unsigned int numRows;
-    unsigned int numCols;
-
-    if (input == NULL) {
-        return 0;
-    }
-    numRows = input->numRows;
-    numCols = input->numCols;
-
-    switch (input->type.type) {
-
-        #define psImageClipNaNCase(type) \
-    case PS_TYPE_##type: \
-        for (unsigned int row = 0;row<numRows;row++) { \
-            ps##type* inputRow = input->data.type[row]; \
-            for (unsigned int col = 0; col < numCols; col++) { \
-                if (! isfinite(inputRow[col])) { \
-                    inputRow[col] = (ps##type)value; \
-                    numClipped++; \
-                } \
-            } \
-        } \
-        break;
-
-        psImageClipNaNCase(F32)
-        psImageClipNaNCase(F64)
-        psImageClipNaNCase(C32)
-        psImageClipNaNCase(C64)
-
-    default:
-        psError(__func__,"psImageClip does not support the given datatype (%d)",
-                input->type.type);
-    }
-
-    return numClipped;
-}
-
-int psImageOverlaySection(psImage* image, const psImage* overlay, int col0,
-                          int row0, const char* op)
-{
-    unsigned int imageNumRows;
-    unsigned int imageNumCols;
-    unsigned int overlayNumRows;
-    unsigned int overlayNumCols;
-    unsigned int imageRowLimit;
-    unsigned int imageColLimit;
-    psElemType  type;
-
-    if (image == NULL || overlay == NULL) {
-        psError(__func__,"one of the input images was NULL.");
-        return 1;
-    }
-
-    if (op == NULL) {
-        psError(__func__,"Operation can not be NULL.");
-        return 1;
-    }
-
-    type = image->type.type;
-
-    if (type != overlay->type.type) {
-        psError(__func__,"Image and overlay datatypes must match. (%d vs %d)",
-                type,overlay->type.type);
-        return 2;
-    }
-
-    imageNumRows = image->numRows;
-    imageNumCols = image->numCols;
-    overlayNumRows = overlay->numRows;
-    overlayNumCols = overlay->numCols;
-
-    /* check row0/col0 to see if it is within the image size */
-    if (row0 < 0 || col0 < 0 || row0 >= imageNumRows || col0 >= imageNumCols) {
-        psError(__func__, "Overlay origin of (%d,%d) is outside of the image dimensions (%d x %d).",
-                col0, row0, imageNumCols, imageNumRows);
-        return 3;
-    }
-
-    /* check if overlay is totally withing input image */
-    imageRowLimit = row0+overlayNumRows;
-    imageColLimit = col0+overlayNumCols;
-    if (imageRowLimit > imageNumRows || imageColLimit > imageNumCols) {
-        psError(__func__, "Overlay image (%d,%d -> %d,%d) is partially outside"
-                " of the input image (%d x %d).",
-                col0, row0, col0+overlayNumCols-1, row0+overlayNumRows-1,
-                imageNumCols,imageNumRows);
-        return 4;
-    }
-
-    switch (type) {
-
-        #define psImageOverlayCase(DATATYPE) \
-    case PS_TYPE_##DATATYPE: \
-        for (unsigned int row=row0;row<imageRowLimit;row++) { \
-            ps##DATATYPE* imageRow = image->data.DATATYPE[row]; \
-            ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row-row0]; \
-            for (unsigned int col=col0;col<imageColLimit;col++) { \
-                switch (*op) { \
-                case '+': \
-                    imageRow[col] += overlayRow[col-col0]; \
-                    break; \
-                case '-': \
-                    imageRow[col] -= overlayRow[col-col0]; \
-                    break; \
-                case '*': \
-                    imageRow[col] *= overlayRow[col-col0]; \
-                    break; \
-                case '/': \
-                    imageRow[col] /= overlayRow[col-col0]; \
-                    break; \
-                case '=': \
-                    imageRow[col] = overlayRow[col-col0]; \
-                    break; \
-                default: \
-                    psError(__func__,"Unknown operation %s",op); \
-                    return 5; \
-                } \
-            } \
-        } \
-        break;
-
-        psImageOverlayCase(U8);
-        psImageOverlayCase(U16);
-        psImageOverlayCase(U32);
-        psImageOverlayCase(U64);
-        psImageOverlayCase(S8);
-        psImageOverlayCase(S16);
-        psImageOverlayCase(S32);
-        psImageOverlayCase(S64);
-        psImageOverlayCase(F32);
-        psImageOverlayCase(F64);
-        psImageOverlayCase(C32);
-        psImageOverlayCase(C64);
-
-    default:
-        psError(__func__,"Can not operate on type %d.",type);
-    }
-
-    return 0;
-}
Index: /trunk/psLib/src/mathtypes/psImage.h
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.h	(revision 1204)
+++ /trunk/psLib/src/mathtypes/psImage.h	(revision 1205)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-23 23:00:15 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-09 21:48:07 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -137,51 +137,4 @@
 );
 
-/** Clip image values outside of tange to given values
- *
- *  All pixels with values less than min are set to the value vmin.  all pixels
- *  with values greater than max are set to the value vmax. This function is
- *  defined for psU8, psU16, psS8, psS16, psF32, psF64, psC32, and psC64.
- *
- *  @return int     The number of clipped pixels
- */
-int psImageClip(
-    psImage* input,                 ///< the image to clip
-    psF32 min,                      ///< the minimum image value allowed
-    psF32 vmin,                     ///< the value pixels < min are set to
-    psF32 max,                      ///< the maximum image value allowed
-    psF32 vmax                      ///< the value pixels > max are set to
-);
-
-/** Clip NaN image pixels to given value.
- *
- *  Pixels with NaN, +Inf, or -Inf values are set to the specified value. This
- *  function is defined for psF32, psF64, psC32, and psC64.
- *
- *  @return int     The number of clipped pixels
- */
-int psImageClipNaN(
-    psImage* input,                 ///< the image to clip
-    psF32 value                     ///< the value to set all NaN/Inf values to
-);
-
-/** Overlay subregion of image with another image
- *
- *  Replace the pixels in the image which correspond to the pixels in OVERLAY
- *  with values derived from the IMAGE and OVERLAY based on the given operator
- *  OP.  Valid operators are "=" (set image value to OVERLAY value), "+" (add
- *  OVERLAY value to image value), "-" (subtract OVERLAY from image), "*"
- *  (multiply OVERLAY times image), "/" (divide image by OVERLAY).  This
- *  function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
- *
- *  @return int         0 if success, non-zero if failed.
- */
-int psImageOverlaySection(
-    psImage* image,                 ///< target image
-    const psImage* overlay,         ///< the overlay image
-    int col0,                       ///< the column to start overlay
-    int row0,                       ///< the row to start overlay
-    const char* op                  ///< the operation to perform for overlay
-);
-
 /// @}
 
