class_docstr: Convert int16 mask image to box, which has the same size with the input image.
  Pairs with :py:class:`monai.apps.detection.transforms.array.BoxToMask`.
  Please make sure the same ``min_fg_label`` is used when using the two transforms in pairs.
  
  Args:
      bg_label: background labels for the output mask image, make sure it is smaller than any foreground(fg) labels.
      box_dtype: output dtype for boxes
      label_dtype: output dtype for labels
class_docstr_tok: ["Convert","int16","mask","image","to","box",",","which","has","the","same","size","with","the","input","image",".","Pairs","with",":","py",":","class",":","`","monai.apps.detection.transforms.array.BoxToMask","`",".","Please","make","sure","the","same","``","min_fg_label","``","is","used","when","using","the","two","transforms","in","pairs",".","Args",":","bg_label",":","background","labels","for","the","output","mask","image",",","make","sure","it","is","smaller","than","any","foreground","(","fg",")","labels",".","box_dtype",":","output","dtype","for","boxes","label_dtype",":","output","dtype","for","labels"]
docstr: Args:
      boxes_mask: int16 array, sized (num_box, H, W). Each channel represents a box.
          The foreground region in channel c has intensity of labels[c].
          The background intensity is bg_label.
  
  Return:
      - bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``.
      - classification foreground(fg) labels, dtype should be int, sized (N,).
docstr_tok: ["Args",":","boxes_mask",":","int16","array",",","sized","(","num_box",",","H",",","W",")",".","Each","channel","represents","a","box",".","The","foreground","region","in","channel","c","has","intensity","of","labels","[","c","]",".","The","background","intensity","is","bg_label",".","Return",":","-","bounding","boxes",",","Nx4","or","Nx6","torch","tensor","or","ndarray",".","The","box","mode","is","assumed","to","be","``","StandardMode","``",".","-","classification","foreground","(","fg",")","labels",",","dtype","should","be","int",",","sized","(","N",",",")","."]
code: def __call__(
      self, boxes_mask: NdarrayOrTensor
  ) -> tuple[NdarrayOrTensor, NdarrayOrTensor]:
      """
      Args:
          boxes_mask: int16 array, sized (num_box, H, W). Each channel represents a box.
              The foreground region in channel c has intensity of labels[c].
              The background intensity is bg_label.
  
      Return:
          - bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``.
          - classification foreground(fg) labels, dtype should be int, sized (N,).
      """
      return convert_mask_to_box(
          boxes_mask, self.bg_label, self.box_dtype, self.label_dtype
      )
  
imports: from __future__ import annotations
  from typing import Any, Sequence
  import numpy
  import torch
  from monai.config.type_definitions import DtypeLike, NdarrayOrTensor, NdarrayTensor
  from monai.data.box_utils import BoxMode, clip_boxes_to_image, convert_box_mode, convert_box_to_standard_mode, get_spatial_dims, spatial_crop_boxes, standardize_empty_box
  from monai.transforms import Rotate90, SpatialCrop
  from monai.transforms.transform import Transform
  from monai.utils import ensure_tuple, ensure_tuple_rep, fall_back_tuple, look_up_option
  from monai.utils.enums import TransformBackends
  from .box_ops import apply_affine_to_boxes, convert_box_to_mask, convert_mask_to_box, flip_boxes, resize_boxes, rot90_boxes, select_labels, zoom_boxes
label_desc: Use image node_id 2 for calling the MaskToBox obj's underlying member method code with example usage: obj.__call__(boxes_mask) and returns: convert_mask_to_box