docstr: :param image_name:
  :param modalities:
  :param model_filename:
  :param binary_masking_func: set to None for global mapping
  :param norm_type:
  :param cutoff:
  :param name:
docstr_tok: [":","param","image_name",":",":","param","modalities",":",":","param","model_filename",":",":","param","binary_masking_func",":","set","to","None","for","global","mapping",":","param","norm_type",":",":","param","cutoff",":",":","param","name",":"]
code: def __init__(
      self,
      image_name,
      modalities,
      model_filename=None,
      binary_masking_func=None,
      norm_type="percentile",
      cutoff=(0.05, 0.95),
      name="hist_norm",
  ):
      """
  
      :param image_name:
      :param modalities:
      :param model_filename:
      :param binary_masking_func: set to None for global mapping
      :param norm_type:
      :param cutoff:
      :param name:
      """
  
      super(HistogramNormalisationLayer, self).__init__(name=name)
      if model_filename is None:
          model_filename = os.path.join(".", "histogram_ref_file.txt")
      self.model_file = os.path.abspath(model_filename)
      assert not os.path.isdir(self.model_file), (
          "model_filename is a directory, "
          "please change histogram_ref_file to a filename."
      )
  
      if binary_masking_func:
          assert isinstance(binary_masking_func, BinaryMaskingLayer)
          self.binary_masking_func = binary_masking_func
      else:
          self.binary_masking_func = None
      self.norm_type = norm_type
      self.cutoff = cutoff
  
      # mapping is a complete cache of the model file, the total number of
      # modalities are listed in self.modalities tuple
      self.image_name = image_name
      self.modalities = modalities
      self.mapping = hs.read_mapping_file(self.model_file)
  
file_path: NiftyNet/niftynet/layer/histogram_normalisation.py
imports: from __future__ import absolute_import, print_function, division
  import os
  import numpy
  import tensorflow
  import niftynet.utilities.histogram_standardisation
  from niftynet.layer.base_layer import DataDependentLayer
  from niftynet.layer.binary_masking import BinaryMaskingLayer
label_desc: Use image node_id 1 to create a new HistogramNormalisationLayer object from inherited base classes: DataDependentLayer with example: obj = HistogramNormalisationLayer(image_name, modalities, model_filename, binary_masking_func, norm_type, cutoff, name)