class_docstr: Converts SciPy-style contours (generated by skimage.measure.find_contours) to a more succinct version which only includes
  the pixels to which lines need to be drawn (i.e. not the intervening pixels along each line).
  
  Args:
      height: height of bounding box, used to detect direction of line segment.
      width: width of bounding box, used to detect direction of line segment.
  
  Returns:
      the pixels that need to be joined by straight lines to describe the outmost pixels of the foreground similar to
          OpenCV's cv.CHAIN_APPROX_SIMPLE (counterclockwise)
class_docstr_tok: ["Converts","SciPy-style","contours","(","generated","by","skimage.measure.find_contours",")","to","a","more","succinct","version","which","only","includes","the","pixels","to","which","lines","need","to","be","drawn","(","i.e",".","not","the","intervening","pixels","along","each","line",")",".","Args",":","height",":","height","of","bounding","box",",","used","to","detect","direction","of","line","segment",".","width",":","width","of","bounding","box",",","used","to","detect","direction","of","line","segment",".","Returns",":","the","pixels","that","need","to","be","joined","by","straight","lines","to","describe","the","outmost","pixels","of","the","foreground","similar","to","OpenCV","'s","cv.CHAIN_APPROX_SIMPLE","(","counterclockwise",")"]
docstr: Generate contour coordinates. Given the previous and current coordinates of border positions,
  returns the int pixel that marks the extremity of the segmented pixels.
  
  Args:
      current: coordinates of the current border position.
      previous: coordinates of the previous border position.
docstr_tok: ["Generate","contour","coordinates",".","Given","the","previous","and","current","coordinates","of","border","positions",",","returns","the","int","pixel","that","marks","the","extremity","of","the","segmented","pixels",".","Args",":","current",":","coordinates","of","the","current","border","position",".","previous",":","coordinates","of","the","previous","border","position","."]
code: def _generate_contour_coord(
      self, current: np.ndarray, previous: np.ndarray
  ) -> tuple[int, int]:
      """
      Generate contour coordinates. Given the previous and current coordinates of border positions,
      returns the int pixel that marks the extremity of the segmented pixels.
  
      Args:
          current: coordinates of the current border position.
          previous: coordinates of the previous border position.
      """
  
      p_delta = (current[0] - previous[0], current[1] - previous[1])
  
      if p_delta in ((0.0, 1.0), (0.5, 0.5), (1.0, 0.0)):
          row = int(current[0] + 0.5)
          col = int(current[1])
      elif p_delta in ((0.0, -1.0), (0.5, -0.5)):
          row = int(current[0])
          col = int(current[1])
      elif p_delta in ((-1, 0.0), (-0.5, -0.5)):
          row = int(current[0])
          col = int(current[1] + 0.5)
      elif p_delta == (-0.5, 0.5):
          row = int(current[0] + 0.5)
          col = int(current[1] + 0.5)
  
      return row, col
  
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 GenerateSuccinctContour obj's underlying member method code with example usage: obj._generate_contour_coord(current, previous) and returns: row,  col