Index: trunk/psLib/src/imageops/psImagePixelManip.c
===================================================================
--- trunk/psLib/src/imageops/psImagePixelManip.c	(revision 12256)
+++ trunk/psLib/src/imageops/psImagePixelManip.c	(revision 12431)
@@ -10,6 +10,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-06 03:09:58 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-03-14 00:39:50 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -20,5 +20,4 @@
 #endif
 
-#include <complex.h>
 #include <math.h>                          // for isfinite(), etc.
 #include <stdlib.h>
@@ -90,33 +89,4 @@
         break;
 
-        #define psImageClipCaseComplex(type,absfcn)\
-    case PS_TYPE_##type: { \
-            if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \
-                psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
-                        _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \
-                        "vmin",vmin, PS_TYPE_##type##_NAME, \
-                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
-            } \
-            if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \
-                psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
-                        _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \
-                        "vmax",vmax, PS_TYPE_##type##_NAME, \
-                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
-            } \
-            for (psU32 row = 0;row<numRows;row++) { \
-                ps##type* inputRow = input->data.type[row]; \
-                for (psU32 col = 0; col < numCols; col++) { \
-                    if (absfcn(inputRow[col]) < min) { \
-                        inputRow[col] = (ps##type)vmin; \
-                        numClipped++; \
-                    } else if (absfcn(inputRow[col]) > max) { \
-                        inputRow[col] = (ps##type)vmax; \
-                        numClipped++; \
-                    } \
-                } \
-            } \
-        } \
-        break;
-
         psImageClipCase(S8)
         psImageClipCase(S16)
@@ -129,6 +99,4 @@
         psImageClipCase(F32)
         psImageClipCase(F64)
-        psImageClipCaseComplex(C32, cabsf)
-        psImageClipCaseComplex(C64, cabs)
 
     default: {
@@ -174,6 +142,4 @@
         psImageClipNaNCase(F32)
         psImageClipNaNCase(F64)
-        psImageClipNaNCase(C32)
-        psImageClipNaNCase(C64)
 
     default: {
@@ -331,6 +297,4 @@
         psImageOverlayCase(F32,NAN);
         psImageOverlayCase(F64,NAN);
-        psImageOverlayCase(C32,NAN);
-        psImageOverlayCase(C64,NAN);
 
     default: {
@@ -347,87 +311,2 @@
 }
 
-int psImageClipComplexRegion(psImage* input,
-                             double complex min,
-                             double complex vmin,
-                             double complex max,
-                             double complex vmax)
-{
-    psS32 numClipped = 0;
-    psU32 numRows;
-    psU32 numCols;
-    psF64 realMin = creal(min);
-    psF64 imagMin = cimag(min);
-    psF64 realMax = creal(max);
-    psF64 imagMax = cimag(max);
-
-    if (input == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                _("Can not operate on a NULL psImage."));
-        return 0;
-    }
-
-    if (realMax < realMin) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                _("Specified real-portion of min value, %g, can not be greater than the real-portion of max value, %g."),
-                (double)realMin, (double)realMax);
-        return 0;
-    }
-    if (imagMax < imagMin) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                _("Specified imaginary-portion of min value, %g, can not be greater than the imaginary-portion of max value, %g."),
-                (double)imagMin, (double)imagMax);
-        return 0;
-    }
-
-    numRows = input->numRows;
-    numCols = input->numCols;
-
-    #define psImageClipComplexRegionCase(type,realfcn,imagfcn) \
-case PS_TYPE_##type: { \
-        if (realfcn(vmin) < PS_MIN_##type || imagfcn(vmin) < PS_MIN_##type || \
-                realfcn(vmin) > PS_MAX_##type || imagfcn(vmin) > PS_MAX_##type ) { \
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
-                    _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \
-                    "vmin", creal(vmin), cimag(vmin), \
-                    PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \
-            break; \
-        } \
-        if (realfcn(vmax) > PS_MAX_##type || imagfcn(vmax) > PS_MAX_##type || \
-                realfcn(vmax) < PS_MIN_##type || imagfcn(vmax) < PS_MIN_##type ) { \
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
-                    _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \
-                    "vmax", creal(vmax), cimag(vmax), \
-                    PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \
-            break; \
-        } \
-        for (psU32 row = 0;row<numRows;row++) { \
-            ps##type* inputRow = input->data.type[row]; \
-            for (psU32 col = 0; col < numCols; col++) { \
-                if ( (realfcn(inputRow[col]) > realMax) || (imagfcn(inputRow[col]) > imagMax) ) { \
-                    inputRow[col] = (ps##type)vmax; \
-                    numClipped++; \
-                } else if ( (realfcn(inputRow[col]) < realMin) || (imagfcn(inputRow[col]) < imagMin) ){ \
-                    inputRow[col] = (ps##type)vmin; \
-                    numClipped++; \
-                } \
-            } \
-        } \
-    } \
-    break;
-
-    switch (input->type.type) {
-
-        psImageClipComplexRegionCase(C32, crealf, cimagf)
-        psImageClipComplexRegionCase(C64, creal, cimag)
-
-    default: {
-            char* typeStr;
-            PS_TYPE_NAME(typeStr,input->type.type);
-            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    _("Specified psImage type, %s, is not supported."),
-                    typeStr);
-        }
-    }
-
-    return numClipped;
-}
