Index: trunk/psLib/src/image/psImage.c
===================================================================
--- trunk/psLib/src/image/psImage.c	(revision 1193)
+++ 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;
-}
