class_docstr: Generate markers to be used in `watershed`. The watershed algorithm treats pixels values as a local topography
  (elevation). The algorithm floods basins from the markers until basins attributed to different markers meet on
  watershed lines. Generally, markers are chosen as local minima of the image, from which basins are flooded.
  Here is the implementation from HoVerNet paper.
  For more details refer to papers: https://arxiv.org/abs/1812.06499.
  
  Args:
      threshold: a float value to threshold to binarize instance border map.
          It turns uncertain area to 1 and other area to 0. Defaults to 0.4.
      radius: the radius of the disk-shaped footprint used in `opening`. Defaults to 2.
      min_object_size: objects smaller than this size (in pixel) are removed. Defaults to 10.
      postprocess_fn: additional post-process function on the markers.
          If not provided, :py:class:`monai.transforms.post.FillHoles()` will be used.
      dtype: target data type to convert to. Defaults to np.int64.
class_docstr_tok: ["Generate","markers","to","be","used","in","`","watershed","`",".","The","watershed","algorithm","treats","pixels","values","as","a","local","topography","(","elevation",")",".","The","algorithm","floods","basins","from","the","markers","until","basins","attributed","to","different","markers","meet","on","watershed","lines",".","Generally",",","markers","are","chosen","as","local","minima","of","the","image",",","from","which","basins","are","flooded",".","Here","is","the","implementation","from","HoVerNet","paper",".","For","more","details","refer","to","papers",":","https",":","\/\/arxiv.org\/abs\/1812.06499",".","Args",":","threshold",":","a","float","value","to","threshold","to","binarize","instance","border","map",".","It","turns","uncertain","area","to","1","and","other","area","to","0",".","Defaults","to","0.4.","radius",":","the","radius","of","the","disk-shaped","footprint","used","in","`","opening","`",".","Defaults","to","2.","min_object_size",":","objects","smaller","than","this","size","(","in","pixel",")","are","removed",".","Defaults","to","10.","postprocess_fn",":","additional","post-process","function","on","the","markers",".","If","not","provided",",",":","py",":","class",":","`","monai.transforms.post.FillHoles","(",")","`","will","be","used",".","dtype",":","target","data","type","to","convert","to",".","Defaults","to","np.int64","."]
code: def __init__(
      self,
      threshold: float = 0.4,
      radius: int = 2,
      min_object_size: int = 10,
      postprocess_fn: Callable | None = None,
      dtype: DtypeLike = np.int64,
  ) -> None:
      self.threshold = threshold
      self.radius = radius
      self.dtype = dtype
      if postprocess_fn is None:
          postprocess_fn = FillHoles()
  
      self.postprocess_fn = postprocess_fn
      self.remove_small_objects = (
          RemoveSmallObjects(min_size=min_object_size)
          if min_object_size > 0
          else None
      )
  
imports: from __future__ import annotations
  import warnings
  from typing import Callable, Sequence
  import numpy
  import torch
  from monai.config.type_definitions import DtypeLike, NdarrayOrTensor
  from monai.transforms import Activations, AsDiscrete, BoundingRect, FillHoles, GaussianSmooth, RemoveSmallObjects, SobelGradients
  from monai.transforms.transform import Transform
  from monai.transforms.utils_pytorch_numpy_unification import max, maximum, min, sum, unique
  from monai.utils import TransformBackends, convert_to_numpy, optional_import
  from monai.utils.misc import ensure_tuple_rep
  from monai.utils.type_conversion import convert_to_dst_type, convert_to_tensor
label_desc: Use image node_id 1 to create a new GenerateWatershedMarkers object from inherited base classes: Transform with example: obj = GenerateWatershedMarkers(threshold, radius, min_object_size, postprocess_fn, dtype)