code: def test_ssd(self):
      m = numpy.array([[0, 0, 0], [0, 0, 0], [0, 0, 0]])
      s = numpy.array([[1, 2, 3], [3, 4, 5], [5, 6, 7]])
  
      e = numpy.array([[1, 4, 9], [9, 16, 25], [25, 36, 49]])
      r, sgn = ssd(m, s, normalized=False, signed=False, size=1)
      self.assertEqual(sgn, 1, "signed=False failed to return scalar 1")
      numpy.testing.assert_allclose(r, e)
  
      esgn = numpy.array([[-1, -1, -1], [-1, -1, -1], [-1, -1, -1]])
      r, sgn = ssd(m, s, normalized=False, signed=True, size=1)
      numpy.testing.assert_allclose(
          sgn, esgn, err_msg="signed=True failed"
      )
      numpy.testing.assert_allclose(r, e)
  
      esgn = numpy.array([[1, 1, 1], [1, 1, 1], [1, 1, 1]])
      r, sgn = ssd(s, m, normalized=False, signed=True, size=1)
      numpy.testing.assert_allclose(
          sgn, esgn, err_msg="signed=True failed"
      )
      numpy.testing.assert_allclose(r, e)
  
      r, _ = ssd(m, s, normalized=True, signed=False, size=1)
      numpy.testing.assert_allclose(
          r, e, err_msg="normalized=True failed"
      )
  
      fp = numpy.array([[1, 0], [1, 0], [0, 1]])
      e = numpy.array([[26, 45, 50], [46, 69, 70], [50, 77, 90]])
      r, _ = ssd(
          m,
          s,
          normalized=False,
          signed=False,
          footprint=fp,
          mode="mirror",
      )
      numpy.testing.assert_allclose(
          r, e, err_msg="using footprint failed"
      )
  
      e = e / 3.0
      r, _ = ssd(
          m,
          s,
          normalized=True,
          signed=False,
          footprint=fp,
          mode="mirror",
      )
      numpy.testing.assert_allclose(
          r, e, err_msg="normalized=True using footprint failed"
      )
  
file_path: medpy/tests/filter_/image.py
imports: import unittest
  import numpy
  from medpy.filter.image import ssd, sls, sum_filter, average_filter
  from scipy.ndimage import gaussian_filter
label_desc: Use image node_id 3 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_ssd() without return types