Index: trunk/psLib/src/imageops/psImageConvolve.c
===================================================================
--- trunk/psLib/src/imageops/psImageConvolve.c	(revision 7089)
+++ trunk/psLib/src/imageops/psImageConvolve.c	(revision 7091)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-05-09 03:16:52 $
+ *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-05-09 03:27:25 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -487,101 +487,7 @@
 }
 
-// XXX this is the old version from MHPCC
-# if 0
 bool psImageSmooth (psImage *image,
                     double  sigma,
                     double  Nsigma)
-{
-    PS_ASSERT_IMAGE_NON_NULL(image, NULL);
-
-    int Nx, Ny, Npixel, Nrange;
-    double factor, g, s;
-    psVector *temp;
-
-    // relevant terms
-    Nrange = sigma*Nsigma + 0.5;
-    Npixel = 2*Nrange + 1;
-    factor = -0.5/(sigma*sigma);
-
-    Nx = image->numCols;
-    Ny = image->numRows;
-
-    #define IMAGESMOOTH_CASE(TYPE) \
-case PS_TYPE_##TYPE: { \
-        /* generate gaussian */ \
-        psVector *gaussnorm = psVectorAlloc (Npixel, PS_TYPE_##TYPE); \
-        for (int i = -Nrange; i < Nrange + 1; i++) { \
-            gaussnorm->data.TYPE[i+Nrange] = exp (factor*i*i); \
-        } \
-        ps##TYPE *gauss = &gaussnorm->data.TYPE[Nrange]; \
-        \
-        /* smooth in X direction */ \
-        temp = psVectorAlloc (Nx, PS_TYPE_##TYPE); \
-        for (int j = 0; j < Ny; j++) { \
-            ps##TYPE *vi = image->data.TYPE[j]; \
-            ps##TYPE *vo = temp->data.TYPE; \
-            for (int i = 0; i < Nx; i++) { \
-                g = s = 0; \
-                for (int n = -Nrange; n < Nrange + 1; n++) { \
-                    if (i+n < 0) \
-                        continue; \
-                    if (i+n >= Nx) \
-                        continue; \
-                    s += gauss[n]*vi[i+n]; \
-                    g += gauss[n]; \
-                } \
-                vo[i] = s / g; \
-            } \
-            memcpy (image->data.TYPE[j], temp->data.TYPE, Nx*sizeof(ps##TYPE)); \
-        } \
-        psFree (temp); \
-        \
-        /* smooth in Y direction */ \
-        temp = psVectorAlloc (image->numRows, PS_TYPE_##TYPE); \
-        for (int i = 0; i < Nx; i++) { \
-            ps##TYPE  *vo = temp->data.TYPE; \
-            ps##TYPE **vi = image->data.TYPE; \
-            for (int j = 0; j < Ny; j++) { \
-                g = s = 0; \
-                for (int n = -Nrange; n < Nrange + 1; n++) { \
-                    if (j+n < 0) \
-                        continue; \
-                    if (j+n >= Ny) \
-                        continue; \
-                    s += gauss[n]*vi[j+n][i]; \
-                    g += gauss[n]; \
-                } \
-                vo[j] = s / g; \
-            } \
-            /* replace temp in image */ \
-            for (int j = 0; j < Ny; j++) { \
-                vi[j][i] = vo[j]; \
-            } \
-        } \
-        psFree (temp); \
-        psFree (gaussnorm); \
-        break; \
-    }
-
-    switch (image->type.type) {
-        IMAGESMOOTH_CASE(F32);
-        IMAGESMOOTH_CASE(F64);
-    default: {
-            char* typeStr;
-            PS_TYPE_NAME(typeStr,image->type.type);
-            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
-                    typeStr);
-            return false;
-        }
-    }
-    return true;
-}
-# else
-
-    // XXX EAM : we MUST use this version : it is a factor of >7 faster than the above
-    bool psImageSmooth (psImage *image,
-                        double  sigma,
-                        double  Nsigma)
 {
     PS_ASSERT_IMAGE_NON_NULL(image, NULL);
@@ -763,4 +669,2 @@
     return true;
 }
-
-# endif
