docstr: Test the feature: local_mean_gauss.
docstr_tok: ["Test","the","feature",":","local_mean_gauss","."]
code: def test_local_mean_gauss(self):
      """Test the feature: local_mean_gauss."""
  
      # 2D to zero case
      i = numpy.asarray([[0, 1, 2], [1, 2, 3], [2, 3, 4]])
      e = [0, 1, 1, 1, 2, 2, 1, 2, 2]
      r = local_mean_gauss(i, 1)
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 2D failed"
      )
  
      # 2D to zero case
      i = numpy.asarray([[0, 1], [1, 0]])
      e = [0, 0, 0, 0]
      r = local_mean_gauss(i, 1)
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 2D to zero failed"
      )
  
      # 2D zero case
      i = numpy.asarray([[0, 0], [0, 0]])
      r = local_mean_gauss(i, 1)
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 2D zero case failed"
      )
  
      # 2D different axes
      i = numpy.asarray(
          [[0, 0, 0, 1], [0, 0, 1, 2], [0, 1, 2, 3], [1, 2, 3, 4]]
      )
      e = [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 2]
      r = local_mean_gauss(i, (1, 0.5))
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 2D different axes failed"
      )
  
      # 2D voxelspacing
      r = local_mean_gauss(i, 1, voxelspacing=[1.0, 2.0])
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 2D voxelspacing failed"
      )
  
      # 3D with 2D kernel
      i = numpy.asarray([i, i])
      e = numpy.asarray([e, e]).ravel()
      r = local_mean_gauss(i, (0, 1, 0.5))
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 3D with 2D kernel failed"
      )
  
      # 3D
      e = numpy.asarray(
          [
              [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 1, 1]],
              [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 1, 1]],
          ]
      ).ravel()
      r = local_mean_gauss(i, 2)
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 3D failed"
      )
  
      # 4D
      i = numpy.asarray([i, i])
      e = [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          1,
          0,
          0,
          0,
          1,
          0,
          1,
          1,
          2,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          1,
          0,
          0,
          0,
          1,
          0,
          1,
          1,
          2,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          1,
          0,
          0,
          0,
          1,
          0,
          1,
          1,
          2,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          1,
          0,
          0,
          0,
          1,
          0,
          1,
          1,
          2,
      ]
      r = local_mean_gauss(i, 1)
      numpy.testing.assert_allclose(
          r, e, err_msg="local mean gauss: 4D failed"
      )
  
file_path: medpy/tests/features_/intensity.py
imports: import unittest
  import math
  import numpy
  from medpy.features.intensity import intensities, centerdistance, centerdistance_xdminus1, indices, local_mean_gauss, local_histogram
  from medpy.features.utilities import join, append
  from medpy.core.exceptions import ArgumentError
label_desc: Use image node_id 2 for calling the TestIntensityFeatures obj's underlying member method code with example usage: obj.test_local_mean_gauss() without return types