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: Get the seed and label arrays for the max-flow algorithm
  
  Args:
      data: Input array
      sink_mode (str, optional): Sink mode. Defaults to 'all'.
      sink_mask (NDArray, optional): Sink mask. Defaults to None.
  
  Returns:
      Tuple[NDArray, NDArray]: Seed and label arrays
docstr_tok: ["Get","the","seed","and","label","arrays","for","the","max-flow","algorithm","Args",":","data",":","Input","array","sink_mode","(","str",",","optional",")",":","Sink","mode",".","Defaults","to","'all","'",".","sink_mask","(","NDArray",",","optional",")",":","Sink","mask",".","Defaults","to","None",".","Returns",":","Tuple","[","NDArray",",","NDArray","]",":","Seed","and","label","arrays"]
code: def get_seed_and_labels(
      self,
      data: NDArray,
      sink_mode: str = "all",
      sink_mask: NDArray | None = None,
  ) -> tuple[NDArray, NDArray]:
      """Get the seed and label arrays for the max-flow algorithm
  
      Args:
          data: Input array
          sink_mode (str, optional): Sink mode. Defaults to 'all'.
          sink_mask (NDArray, optional): Sink mask. Defaults to None.
  
      Returns:
          Tuple[NDArray, NDArray]: Seed and label arrays
      """
  
      # Seeds and labels (boundary conditions)
      seeds = np.array([], dtype="float64")
      labels = np.array([], dtype="float64")
  
      # Indices for all columns
      sc = np.arange(data.shape[1], dtype="float64")
  
      # SOURCE ELEMENTS - 1st matrix row
      # Indices for 1st row, it will be broadcasted with sc
      sr_up = np.array([0])
      seed = self.sub2ind(data.shape, sr_up, sc).astype("float64")
      seed = np.unique(seed)
      seeds = np.concatenate((seeds, seed))
  
      # Label 1
      label = np.ones_like(seed)
      labels = np.concatenate((labels, label))
  
      # Create seeds for sink elements
  
      if sink_mode == "all":
          # All elements in the last row
          sr_down = np.ones_like(sc) * (data.shape[0] - 1)
          self._sink_indices = np.array([sr_down, sc], dtype="int32")
          seed = self.sub2ind(data.shape, sr_down, sc).astype("float64")
  
      elif sink_mode == "mid":
          # Middle element in the last row
          sc_down = np.array([data.shape[1] // 2])
          sr_down = np.ones_like(sc_down) * (data.shape[0] - 1)
          self._sink_indices = np.array(
              [sr_down, sc_down], dtype="int32"
          )
          seed = self.sub2ind(data.shape, sr_down, sc_down).astype(
              "float64"
          )
  
      elif sink_mode == "min":
          # Minimum element in the last row (excluding 10% from the edges)
          ten_percent = int(data.shape[1] * 0.1)
          min_val = np.min(data[-1, ten_percent:-ten_percent])
          min_idxs = (
              np.where(data[-1, ten_percent:-ten_percent] == min_val)[0]
              + ten_percent
          )
          sc_down = min_idxs
          sr_down = np.ones_like(sc_down) * (data.shape[0] - 1)
          self._sink_indices = np.array(
              [sr_down, sc_down], dtype="int32"
          )
          seed = self.sub2ind(data.shape, sr_down, sc_down).astype(
              "float64"
          )
  
      elif sink_mode == "mask":
          # All elements in the mask
          coords = np.where(sink_mask != 0)
          sr_down = coords[0]
          sc_down = coords[1]
          self._sink_indices = np.array(
              [sr_down, sc_down], dtype="int32"
          )
          seed = self.sub2ind(data.shape, sr_down, sc_down).astype(
              "float64"
          )
  
      seed = np.unique(seed)
      seeds = np.concatenate((seeds, seed))
  
      # Label 2
      label = np.ones_like(seed) * 2
      labels = np.concatenate((labels, label))
  
      return seeds, labels
  
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 3 for calling the UltrasoundConfidenceMap obj's underlying member method code with example usage: obj.get_seed_and_labels(data, sink_mode, sink_mask) and returns: seeds,  labels