class_docstr: generate mask used in `watershed`. Only points at which mask == True will be labeled.
  
  Args:
      activation: the activation layer to be applied on the input probability map.
          It can be "softmax" or "sigmoid" string, or any callable. Defaults to "softmax".
      threshold: an optional float value to threshold to binarize probability map.
          If not provided, defaults to 0.5 when activation is not "softmax", otherwise None.
      min_object_size: objects smaller than this size (in pixel) are removed. Defaults to 10.
      dtype: target data content type to convert, default is np.uint8.
class_docstr_tok: ["generate","mask","used","in","`","watershed","`",".","Only","points","at","which","mask","==","True","will","be","labeled",".","Args",":","activation",":","the","activation","layer","to","be","applied","on","the","input","probability","map",".","It","can","be","``","softmax","''","or","``","sigmoid","''","string",",","or","any","callable",".","Defaults","to","``","softmax","''",".","threshold",":","an","optional","float","value","to","threshold","to","binarize","probability","map",".","If","not","provided",",","defaults","to","0.5","when","activation","is","not","``","softmax","''",",","otherwise","None",".","min_object_size",":","objects","smaller","than","this","size","(","in","pixel",")","are","removed",".","Defaults","to","10.","dtype",":","target","data","content","type","to","convert",",","default","is","np.uint8","."]
docstr: Args:
      prob_map: probability map of segmentation, shape must be [C, H, W, [D]]
docstr_tok: ["Args",":","prob_map",":","probability","map","of","segmentation",",","shape","must","be","[","C",",","H",",","W",",","[","D","]","]"]
code: def __call__(self, prob_map: NdarrayOrTensor) -> NdarrayOrTensor:
      """
      Args:
          prob_map: probability map of segmentation, shape must be [C, H, W, [D]]
      """
  
      pred = self.activation(prob_map)
      pred = self.as_discrete(pred)
  
      pred = convert_to_numpy(pred)
  
      pred = label(pred)[0]
      if self.remove_small_objects is not None:
          pred = self.remove_small_objects(pred)
      pred[pred > 0] = 1  # type: ignore
  
      return convert_to_dst_type(pred, prob_map, dtype=self.dtype)[0]
  
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 2 for calling the GenerateWatershedMask obj's underlying member method code with example usage: obj.__call__(prob_map) and returns: convert_to_dst_type