class_docstr: This class enables the extraction of image features (Harilick
  features) and basic statistics over a segmentation
class_docstr_tok: ["This","class","enables","the","extraction","of","image","features","(","Harilick","features",")","and","basic","statistics","over","a","segmentation"]
docstr: this function populates the matrix of harilick features for each
  image modality and neighborhood shift and average over the neighbours
  
  :return:
docstr_tok: ["this","function","populates","the","matrix","of","harilick","features","for","each","image","modality","and","neighborhood","shift","and","average","over","the","neighbours",":","return",":"]
code: def harilick_matrix(self):
      """
      this function populates the matrix of harilick features for each
      image modality and neighborhood shift and average over the neighbours
  
      :return:
      """
      multi_mod_glcm = self.glcm()
      matrix_harilick = np.zeros([13, self.neigh, self.img_channels])
      if multi_mod_glcm is None:
          return np.average(matrix_harilick, axis=1)
  
      for i in range(0, self.img_channels):
          for j in range(0, self.neigh):
              matrix = multi_mod_glcm[i][..., j]
              harilick_vector = self.harilick(matrix)
              for index, elem in enumerate(harilick_vector):
                  matrix_harilick[index, j, i] = elem
      return np.average(matrix_harilick, axis=1)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import numpy.ma
  import math
  import scipy.stats.mstats
  import scipy.ndimage
  from niftynet.utilities.util_common import MorphologyOps, CacheFunctionOutput
label_desc: Use image node_id 7 for calling the RegionProperties obj's underlying member method code with example usage: obj.harilick_matrix() and returns: np, np