class_docstr: A subclass of ``BoxMode``.
  
  Also represented as "ccwh" or "cccwhd", with format of
  [xmin, ymin, xsize, ysize] or [xmin, ymin, zmin, xsize, ysize, zsize].
  
  Example:
      .. code-block:: python
  
          CenterSizeMode.get_name(spatial_dims=2) # will return "ccwh"
          CenterSizeMode.get_name(spatial_dims=3) # will return "cccwhd"
class_docstr_tok: ["A","subclass","of","``","BoxMode","``",".","Also","represented","as","``","ccwh","''","or","``","cccwhd","''",",","with","format","of","[","xmin",",","ymin",",","xsize",",","ysize","]","or","[","xmin",",","ymin",",","zmin",",","xsize",",","ysize",",","zsize","]",".","Example",":","..","code-block",":",":","python","CenterSizeMode.get_name","(","spatial_dims=2",")","#","will","return","``","ccwh","''","CenterSizeMode.get_name","(","spatial_dims=3",")","#","will","return","``","cccwhd","''"]
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:
          xc, yc, zc, w, h, d = boxes.split(1, dim=-1)
          xmin = xc - ((w - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          xmax = xc + ((w - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          ymin = yc - ((h - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          ymax = yc + ((h - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          zmin = zc - ((d - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          zmax = zc + ((d - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          corners = xmin, ymin, zmin, xmax, ymax, zmax
      elif spatial_dims == 2:
          xc, yc, w, h = boxes.split(1, dim=-1)
          xmin = xc - ((w - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          xmax = xc + ((w - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          ymin = yc - ((h - TO_REMOVE) / 2.0).to(
              dtype=COMPUTE_DTYPE
          ).clamp(min=0).to(dtype=box_dtype)
          ymax = yc + ((h - TO_REMOVE) / 2.0).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 CenterSizeMode obj's underlying member method code with example usage: obj.boxes_to_corners(boxes) and returns: corners