parameters: (img)
return_statement: return xmin, xmax, ymin, ymax, zmin, zmax
docstring: Find the bounding box of a 3D segmentation mask
docstring_summary: Find the bounding box of a 3D segmentation mask
docstring_tokens: Find the bounding box of a 3D segmentation mask
function: def bbox_coords(img):
      """Find the bounding box of a 3D segmentation mask"""
  
  
      x = np.any(img, axis=(1, 2))
      y = np.any(img, axis=(0, 2))
      z = np.any(img, axis=(0, 1))
  
      xmin, xmax = np.where(x)[0][[0, -1]]
      ymin, ymax = np.where(y)[0][[0, -1]]
      zmin, zmax = np.where(z)[0][[0, -1]]
  
      return xmin, xmax, ymin, ymax, zmin, zmax
function_tokens: def bbox_coords ( img ) : x = np . any ( img , axis = ( 1 , 2 ) ) y = np . any ( img , axis = ( 0 , 2 ) ) z = np . any ( img , axis = ( 0 , 1 ) ) xmin , xmax = np . where ( x ) [ 0 ] [ [ 0 , - 1 ] ] ymin , ymax = np . where ( y ) [ 0 ] [ [ 0 , - 1 ] ] zmin , zmax = np . where ( z ) [ 0 ] [ [ 0 , - 1 ] ] return xmin , xmax , ymin , ymax , zmin , zmax