class_docstr: Generate instance border by hover map. The more parts of the image that cannot be identified as foreground areas,
  the larger the grey scale value. The grey value of the instance's border will be larger.
  
  Args:
      kernel_size: the size of the Sobel kernel. Defaults to 5.
      dtype: target data type to convert to. Defaults to np.float32.
  
  
  Raises:
      ValueError: when the `mask` shape is not [1, H, W].
      ValueError: when the `hover_map` shape is not [2, H, W].
class_docstr_tok: ["Generate","instance","border","by","hover","map",".","The","more","parts","of","the","image","that","can","not","be","identified","as","foreground","areas",",","the","larger","the","grey","scale","value",".","The","grey","value","of","the","instance","'s","border","will","be","larger",".","Args",":","kernel_size",":","the","size","of","the","Sobel","kernel",".","Defaults","to","5.","dtype",":","target","data","type","to","convert","to",".","Defaults","to","np.float32",".","Raises",":","ValueError",":","when","the","`","mask","`","shape","is","not","[","1",",","H",",","W","]",".","ValueError",":","when","the","`","hover_map","`","shape","is","not","[","2",",","H",",","W","]","."]
code: def __init__(
      self, kernel_size: int = 5, dtype: DtypeLike = np.float32
  ) -> None:
      self.dtype = dtype
      self.sobel_gradient = SobelGradients(kernel_size=kernel_size)
  
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 GenerateInstanceBorder object from inherited base classes: Transform with example: obj = GenerateInstanceBorder(kernel_size, dtype)