class_docstr: Compute confidence map from an ultrasound image.
  This transform uses the method introduced by Karamalis et al. in https://doi.org/10.1016/j.media.2012.07.005.
  It generates a confidence map by setting source and sink points in the image and computing the probability
  for random walks to reach the source for each pixel.
  
  Args:
      alpha (float, optional): Alpha parameter. Defaults to 2.0.
      beta (float, optional): Beta parameter. Defaults to 90.0.
      gamma (float, optional): Gamma parameter. Defaults to 0.05.
      mode (str, optional): 'RF' or 'B' mode data. Defaults to 'B'.
      sink_mode (str, optional): Sink mode. Defaults to 'all'. If 'mask' is selected, a mask must be when calling
          the transform. Can be 'all', 'mid', 'min', or 'mask'.
docstr: Compute the confidence map
  
  Args:
      data (NDArray): RF ultrasound data (one scanline per column) [H x W] 2D array
  
  Returns:
      map (NDArray): Confidence map [H x W] 2D array
docstr_tok: ["Compute","the","confidence","map","Args",":","data","(","NDArray",")",":","RF","ultrasound","data","(","one","scanline","per","column",")","[","H","x","W","]","2D","array","Returns",":","map","(","NDArray",")",":","Confidence","map","[","H","x","W","]","2D","array"]
code: def __call__(
      self, data: NDArray, sink_mask: NDArray | None = None
  ) -> NDArray:
      """Compute the confidence map
  
      Args:
          data (NDArray): RF ultrasound data (one scanline per column) [H x W] 2D array
  
      Returns:
          map (NDArray): Confidence map [H x W] 2D array
      """
  
      # Normalize data
      data = data.astype("float64")
      data = self.normalize(data)
  
      if self.mode == "RF":
          # MATLAB hilbert applies the Hilbert transform to columns
          data = np.abs(hilbert(data, axis=0)).astype("float64")
  
      seeds, labels = self.get_seed_and_labels(
          data, self.sink_mode, sink_mask
      )
  
      # Attenuation with Beer-Lambert
      w = self.attenuation_weighting(data, self.alpha)
  
      # Apply weighting directly to image
      # Same as applying it individually during the formation of the
      # Laplacian
      data = data * w
  
      # Find condidence values
      map_: NDArray = self.confidence_estimation(
          data, seeds, labels, self.beta, self.gamma
      )
  
      return map_
  
file_path: MONAI/monai/data/ultrasound_confidence_map.py
imports: from __future__ import annotations
  import numpy
  from numpy.typing import NDArray
  from monai.utils import min_version, optional_import
label_desc: Use image node_id 9 for calling the UltrasoundConfidenceMap obj's underlying member method code with example usage: obj.__call__(data, sink_mask) and returns: map_