class_docstr: This transform converts the boxes in src_mode to the dst_mode.
  
  Args:
      src_mode: source box mode. If it is not given, this func will assume it is ``StandardMode()``.
      dst_mode: target box mode. If it is not given, this func will assume it is ``StandardMode()``.
  
  Note:
      ``StandardMode`` = :class:`~monai.data.box_utils.CornerCornerModeTypeA`,
      also represented as "xyxy" for 2D and "xyzxyz" for 3D.
  
      src_mode and dst_mode can be:
          #. str: choose from :class:`~monai.utils.enums.BoxModeName`, for example,
              - "xyxy": boxes has format [xmin, ymin, xmax, ymax]
              - "xyzxyz": boxes has format [xmin, ymin, zmin, xmax, ymax, zmax]
              - "xxyy": boxes has format [xmin, xmax, ymin, ymax]
              - "xxyyzz": boxes has format [xmin, xmax, ymin, ymax, zmin, zmax]
              - "xyxyzz": boxes has format [xmin, ymin, xmax, ymax, zmin, zmax]
              - "xywh": boxes has format [xmin, ymin, xsize, ysize]
              - "xyzwhd": boxes has format [xmin, ymin, zmin, xsize, ysize, zsize]
              - "ccwh": boxes has format [xcenter, ycenter, xsize, ysize]
              - "cccwhd": boxes has format [xcenter, ycenter, zcenter, xsize, ysize, zsize]
          #. BoxMode class: choose from the subclasses of :class:`~monai.data.box_utils.BoxMode`, for example,
              - CornerCornerModeTypeA: equivalent to "xyxy" or "xyzxyz"
              - CornerCornerModeTypeB: equivalent to "xxyy" or "xxyyzz"
              - CornerCornerModeTypeC: equivalent to "xyxy" or "xyxyzz"
              - CornerSizeMode: equivalent to "xywh" or "xyzwhd"
              - CenterSizeMode: equivalent to "ccwh" or "cccwhd"
          #. BoxMode object: choose from the subclasses of :class:`~monai.data.box_utils.BoxMode`, for example,
              - CornerCornerModeTypeA(): equivalent to "xyxy" or "xyzxyz"
              - CornerCornerModeTypeB(): equivalent to "xxyy" or "xxyyzz"
              - CornerCornerModeTypeC(): equivalent to "xyxy" or "xyxyzz"
              - CornerSizeMode(): equivalent to "xywh" or "xyzwhd"
              - CenterSizeMode(): equivalent to "ccwh" or "cccwhd"
          #. None: will assume mode is ``StandardMode()``
  
  Example:
      .. code-block:: python
  
          boxes = torch.ones(10,4)
          # convert boxes with format [xmin, ymin, xmax, ymax] to [xcenter, ycenter, xsize, ysize].
          box_converter = ConvertBoxMode(src_mode="xyxy", dst_mode="ccwh")
          box_converter(boxes)
class_docstr_tok: ["This","transform","converts","the","boxes","in","src_mode","to","the","dst_mode",".","Args",":","src_mode",":","source","box","mode",".","If","it","is","not","given",",","this","func","will","assume","it","is","``","StandardMode","(",")","``",".","dst_mode",":","target","box","mode",".","If","it","is","not","given",",","this","func","will","assume","it","is","``","StandardMode","(",")","``",".","Note",":","``","StandardMode","``","=",":","class",":","`","~monai.data.box_utils.CornerCornerModeTypeA","`",",","also","represented","as","``","xyxy","''","for","2D","and","``","xyzxyz","''","for","3D",".","src_mode","and","dst_mode","can","be",":","#",".","str",":","choose","from",":","class",":","`","~monai.utils.enums.BoxModeName","`",",","for","example",",","-","``","xyxy","''",":","boxes","has","format","[","xmin",",","ymin",",","xmax",",","ymax","]","-","``","xyzxyz","''",":","boxes","has","format","[","xmin",",","ymin",",","zmin",",","xmax",",","ymax",",","zmax","]","-","``","xxyy","''",":","boxes","has","format","[","xmin",",","xmax",",","ymin",",","ymax","]","-","``","xxyyzz","''",":","boxes","has","format","[","xmin",",","xmax",",","ymin",",","ymax",",","zmin",",","zmax","]","-","``","xyxyzz","''",":","boxes","has","format","[","xmin",",","ymin",",","xmax",",","ymax",",","zmin",",","zmax","]","-","``","xywh","''",":","boxes","has","format","[","xmin",",","ymin",",","xsize",",","ysize","]","-","``","xyzwhd","''",":","boxes","has","format","[","xmin",",","ymin",",","zmin",",","xsize",",","ysize",",","zsize","]","-","``","ccwh","''",":","boxes","has","format","[","xcenter",",","ycenter",",","xsize",",","ysize","]","-","``","cccwhd","''",":","boxes","has","format","[","xcenter",",","ycenter",",","zcenter",",","xsize",",","ysize",",","zsize","]","#",".","BoxMode","class",":","choose","from","the","subclasses","of",":","class",":","`","~monai.data.box_utils.BoxMode","`",",","for","example",",","-","CornerCornerModeTypeA",":","equivalent","to","``","xyxy","''","or","``","xyzxyz","''","-","CornerCornerModeTypeB",":","equivalent","to","``","xxyy","''","or","``","xxyyzz","''","-","CornerCornerModeTypeC",":","equivalent","to","``","xyxy","''","or","``","xyxyzz","''","-","CornerSizeMode",":","equivalent","to","``","xywh","''","or","``","xyzwhd","''","-","CenterSizeMode",":","equivalent","to","``","ccwh","''","or","``","cccwhd","''","#",".","BoxMode","object",":","choose","from","the","subclasses","of",":","class",":","`","~monai.data.box_utils.BoxMode","`",",","for","example",",","-","CornerCornerModeTypeA","(",")",":","equivalent","to","``","xyxy","''","or","``","xyzxyz","''","-","CornerCornerModeTypeB","(",")",":","equivalent","to","``","xxyy","''","or","``","xxyyzz","''","-","CornerCornerModeTypeC","(",")",":","equivalent","to","``","xyxy","''","or","``","xyxyzz","''","-","CornerSizeMode","(",")",":","equivalent","to","``","xywh","''","or","``","xyzwhd","''","-","CenterSizeMode","(",")",":","equivalent","to","``","ccwh","''","or","``","cccwhd","''","#",".","None",":","will","assume","mode","is","``","StandardMode","(",")","``","Example",":","..","code-block",":",":","python","boxes","=","torch.ones","(","10,4",")","#","convert","boxes","with","format","[","xmin",",","ymin",",","xmax",",","ymax","]","to","[","xcenter",",","ycenter",",","xsize",",","ysize","]",".","box_converter","=","ConvertBoxMode","(","src_mode=","''","xyxy","''",",","dst_mode=","''","ccwh","''",")","box_converter","(","boxes",")"]
code: def __init__(
      self,
      src_mode: str | BoxMode | type[BoxMode] | None = None,
      dst_mode: str | BoxMode | type[BoxMode] | None = None,
  ) -> None:
      self.src_mode = src_mode
      self.dst_mode = dst_mode
  
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 ConvertBoxMode object from inherited base classes: Transform with example: obj = ConvertBoxMode(src_mode, dst_mode)