class_docstr: Class to normalize patches/images to a reference or target image stain (see Note).
  
  Performs stain deconvolution of the source image using the ExtractHEStains
  class, to obtain the stain matrix and calculate the stain concentration matrix
  for the image. Then, performs the inverse Beer-Lambert transform to recreate the
  patch using the target H&E stain matrix provided. If no target stain provided, a default
  reference stain is used. Similarly, if no maximum stain concentrations are provided, a
  reference maximum stain concentrations matrix is used.
  
  Args:
      tli: transmitted light intensity. Defaults to 240.
      alpha: tolerance in percentile for the pseudo-min (alpha percentile) and
          pseudo-max (100 - alpha percentile). Defaults to 1.
      beta: absorbance threshold for transparent pixels. Defaults to 0.15.
      target_he: target stain matrix. Defaults to ((0.5626, 0.2159), (0.7201, 0.8012), (0.4062, 0.5581)).
      max_cref: reference maximum stain concentrations for Hematoxylin & Eosin (H&E).
          Defaults to [1.9705, 1.0308].
  
  Note:
      For more information refer to:
      - the original paper: Macenko et al., 2009 http://wwwx.cs.unc.edu/~mn/sites/default/files/macenko2009.pdf
      - the previous implementations:
  
          - MATLAB: https://github.com/mitkovetta/staining-normalization
          - Python: https://github.com/schaugf/HEnorm_python
code: def __init__(
      self,
      tli: float = 240,
      alpha: float = 1,
      beta: float = 0.15,
      target_he: tuple
      | np.ndarray = (
          (0.5626, 0.2159),
          (0.7201, 0.8012),
          (0.4062, 0.5581),
      ),
      max_cref: tuple | np.ndarray = (1.9705, 1.0308),
  ) -> None:
      self.tli = tli
      self.target_he = np.array(target_he)
      self.max_cref = np.array(max_cref)
      self.stain_extractor = ExtractHEStains(
          tli=self.tli, alpha=alpha, beta=beta, max_cref=self.max_cref
      )
  
file_path: MONAI/monai/apps/pathology/transforms/stain/array.py
imports: from __future__ import annotations
  import numpy
  from monai.transforms.transform import Transform
label_desc: Use image node_id 1 to create a new NormalizeHEStains object from inherited base classes: Transform with example: obj = NormalizeHEStains(tli, alpha, beta, target_he, max_cref)