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"]
code: def __init__(
      self,
      bg_label: int = -1,
      box_dtype: DtypeLike | torch.dtype = torch.float32,
      label_dtype: DtypeLike | torch.dtype = torch.long,
  ) -> None:
      self.bg_label = bg_label
      self.box_dtype = box_dtype
      self.label_dtype = 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 1 to create a new MaskToBox object from inherited base classes: Transform with example: obj = MaskToBox(bg_label, box_dtype, label_dtype)