class_docstr: Analyzer to extract image stats properties for each case(image).
  
  Args:
      image_key: the key to find image data in the callable function input (data)
  
  Examples:
  
  .. code-block:: python
  
      import numpy as np
      from monai.auto3dseg import ImageStats
      from monai.data import MetaTensor
  
      input = {}
      input['image'] = np.random.rand(1,30,30,30)
      input['image'] = MetaTensor(np.random.rand(1,30,30,30))  # MetaTensor
      analyzer = ImageStats(image_key="image")
      print(analyzer(input)["image_stats"])
  
  Notes:
      if the image data is NumPy array, the spacing stats will be [1.0] * `ndims` of the array,
      where the `ndims` is the lesser value between the image dimension and 3.
class_docstr_tok: ["Analyzer","to","extract","image","stats","properties","for","each","case","(","image",")",".","Args",":","image_key",":","the","key","to","find","image","data","in","the","callable","function","input","(","data",")","Examples",":","..","code-block",":",":","python","import","numpy","as","np","from","monai.auto3dseg","import","ImageStats","from","monai.data","import","MetaTensor","input","=","{","}","input","[","'image","'","]","=","np.random.rand","(","1,30,30,30",")","input","[","'image","'","]","=","MetaTensor","(","np.random.rand","(","1,30,30,30",")",")","#","MetaTensor","analyzer","=","ImageStats","(","image_key=","''","image","''",")","print","(","analyzer","(","input",")","[","``","image_stats","''","]",")","Notes",":","if","the","image","data","is","NumPy","array",",","the","spacing","stats","will","be","[","1.0","]","*","`","ndims","`","of","the","array",",","where","the","`","ndims","`","is","the","lesser","value","between","the","image","dimension","and","3","."]
code: def __init__(
      self, image_key: str, stats_name: str = DataStatsKeys.IMAGE_STATS
  ) -> None:
      if not isinstance(image_key, str):
          raise ValueError("image_key input must be str")
  
      self.image_key = image_key
  
      report_format = {
          ImageStatsKeys.SHAPE: None,
          ImageStatsKeys.CHANNELS: None,
          ImageStatsKeys.CROPPED_SHAPE: None,
          ImageStatsKeys.SPACING: None,
          ImageStatsKeys.SIZEMM: None,
          ImageStatsKeys.INTENSITY: None,
      }
  
      super().__init__(stats_name, report_format)
      self.update_ops(ImageStatsKeys.INTENSITY, SampleOperations())
  
imports: from __future__ import annotations
  import time
  from abc import ABC, abstractmethod
  from collections.abc import Hashable, Mapping
  from copy import deepcopy
  from typing import Any
  import numpy
  import torch
  from monai.apps.utils import get_logger
  from monai.auto3dseg.operations import Operations, SampleOperations, SummaryOperations
  from monai.auto3dseg.utils import concat_multikeys_to_dict, concat_val_to_np, get_foreground_image, get_foreground_label, get_label_ccp, verify_report_format
  from monai.bundle.config_parser import ConfigParser
  from monai.bundle.utils import ID_SEP_KEY
  from monai.data import MetaTensor, affine_to_spacing
  from monai.transforms.transform import MapTransform
  from monai.transforms.utils_pytorch_numpy_unification import sum, unique
  from monai.utils import convert_to_numpy
  from monai.utils.enums import DataStatsKeys, ImageStatsKeys, LabelStatsKeys
  from monai.utils.misc import ImageMetaKey, label_union
label_desc: Use image node_id 1 to create a new ImageStats object from inherited base classes: Analyzer with example: obj = ImageStats(image_key, stats_name)