class_docstr: A subclass of ``BoxMode``.
  
  Also represented as "xywh" or "xyzwhd", with format of
  [xmin, ymin, xsize, ysize] or [xmin, ymin, zmin, xsize, ysize, zsize].
  
  Example:
      .. code-block:: python
  
          CornerSizeMode.get_name(spatial_dims=2) # will return "xywh"
          CornerSizeMode.get_name(spatial_dims=3) # will return "xyzwhd"
class_docstr_tok: ["A","subclass","of","``","BoxMode","``",".","Also","represented","as","``","xywh","''","or","``","xyzwhd","''",",","with","format","of","[","xmin",",","ymin",",","xsize",",","ysize","]","or","[","xmin",",","ymin",",","zmin",",","xsize",",","ysize",",","zsize","]",".","Example",":","..","code-block",":",":","python","CornerSizeMode.get_name","(","spatial_dims=2",")","#","will","return","``","xywh","''","CornerSizeMode.get_name","(","spatial_dims=3",")","#","will","return","``","xyzwhd","''"]
code: def boxes_to_corners(self, boxes: torch.Tensor) -> tuple:
      corners: tuple
      # convert to float32 when computing torch.clamp, which does not support float16
      box_dtype = boxes.dtype
  
      spatial_dims = get_spatial_dims(boxes=boxes)
      if spatial_dims == 3:
          xmin, ymin, zmin, w, h, d = boxes.split(1, dim=-1)
          xmax = xmin + (w - TO_REMOVE).to(dtype=COMPUTE_DTYPE).clamp(
              min=0
          ).to(dtype=box_dtype)
          ymax = ymin + (h - TO_REMOVE).to(dtype=COMPUTE_DTYPE).clamp(
              min=0
          ).to(dtype=box_dtype)
          zmax = zmin + (d - TO_REMOVE).to(dtype=COMPUTE_DTYPE).clamp(
              min=0
          ).to(dtype=box_dtype)
          corners = xmin, ymin, zmin, xmax, ymax, zmax
      elif spatial_dims == 2:
          xmin, ymin, w, h = boxes.split(1, dim=-1)
          xmax = xmin + (w - TO_REMOVE).to(dtype=COMPUTE_DTYPE).clamp(
              min=0
          ).to(dtype=box_dtype)
          ymax = ymin + (h - TO_REMOVE).to(dtype=COMPUTE_DTYPE).clamp(
              min=0
          ).to(dtype=box_dtype)
          corners = xmin, ymin, xmax, ymax
      return corners
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABC, abstractmethod
  from collections.abc import Callable, Sequence
  from copy import deepcopy
  import numpy
  import torch
  from monai.config.type_definitions import NdarrayOrTensor, NdarrayTensor
  from monai.utils import look_up_option
  from monai.utils.enums import BoxModeName
  from monai.utils.type_conversion import convert_data_type, convert_to_dst_type
label_desc: Use image node_id 1 for calling the CornerSizeMode obj's underlying member method code with example usage: obj.boxes_to_corners(boxes) and returns: corners