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 weighted mean of the image given the probabilistic
  segmentation. If binary, mean and weighted mean will give the same
  result
  
  :return:
docstr_tok: ["Calculates","the","weighted","mean","of","the","image","given","the","probabilistic","segmentation",".","If","binary",",","mean","and","weighted","mean","will","give","the","same","result",":","return",":"]
code: def weighted_mean_(self):
      """
      Calculates the weighted mean of the image given the probabilistic
      segmentation. If binary, mean and weighted mean will give the same
      result
  
      :return:
      """
      masked_seg = np.tile(self.masked_seg, [self.img_channels, 1]).T
      return ma.average(
          self.masked_img, axis=0, weights=masked_seg
      ).flatten()
  
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 39 for calling the RegionProperties obj's underlying member method code with example usage: obj.weighted_mean_() and returns: ma