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: Calculates the angular second moment
  
  :param matrix:
  :return:
docstr_tok: ["Calculates","the","angular","second","moment",":","param","matrix",":",":","return",":"]
code: def contrast(self, matrix):
      """
      Calculates the angular second moment
  
      :param matrix:
      :return:
      """
      contrast = 0
      for i in range(0, matrix.shape[0]):
          for j in range(0, matrix.shape[1]):
              contrast += (j - i) ** 2 * matrix[i, j]
      return contrast
  
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 23 for calling the RegionProperties obj's underlying member method code with example usage: obj.contrast(matrix) and returns: contrast