Index: /trunk/psLib/src/imageops/psImageConvolve.h
===================================================================
--- /trunk/psLib/src/imageops/psImageConvolve.h	(revision 14761)
+++ /trunk/psLib/src/imageops/psImageConvolve.h	(revision 14762)
@@ -5,6 +5,6 @@
  * @author Robert DeSonia, MHPCC
  *
- * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-09-04 23:29:43 $
+ * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-09-05 23:52:11 $
  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
  */
@@ -43,4 +43,16 @@
     } \
     PS_ASSERT_IMAGE_NON_NULL((KERNEL)->image, RETURNVALUE);
+
+#define PS_ASSERT_KERNELS_SIZE_EQUAL(KERNEL1, KERNEL2, RETURNVALUE) \
+    if ((KERNEL1)->xMin != (KERNEL2)->xMin || \
+        (KERNEL1)->xMax != (KERNEL2)->xMax || \
+        (KERNEL1)->yMin != (KERNEL2)->yMin || \
+        (KERNEL1)->yMax != (KERNEL2)->yMax) { \
+        psError(PS_ERR_BAD_PARAMETER_NULL, true, \
+                "Unallowable operation: Kernels %s and %s are not the same size.", \
+                #KERNEL1, #KERNEL2); \
+        return RETURNVALUE; \
+    } \
+    PS_ASSERT_IMAGES_SIZE_EQUAL((KERNEL1)->image, (KERNEL2)->image, RETURNVALUE);
 
 /// Allocates a convolution kernel of the given range
