class_docstr: This class provides a way to calculate a reasonable output voxel spacing according to
  the input dataset. The achieved values can used to resample the input in 3d segmentation tasks
  (like using as the `pixdim` parameter in `monai.transforms.Spacingd`).
  In addition, it also supports to compute the mean, std, min and max intensities of the input,
  and these statistics are helpful for image normalization
  (as parameters of `monai.transforms.ScaleIntensityRanged` and `monai.transforms.NormalizeIntensityd`).
  
  The algorithm for calculation refers to:
  `Automated Design of Deep Learning Methods for Biomedical Image Segmentation <https://arxiv.org/abs/1904.08128>`_.
class_docstr_tok: ["This","class","provides","a","way","to","calculate","a","reasonable","output","voxel","spacing","according","to","the","input","dataset",".","The","achieved","values","can","used","to","resample","the","input","in","3d","segmentation","tasks","(","like","using","as","the","`","pixdim","`","parameter","in","`","monai.transforms.Spacingd","`",")",".","In","addition",",","it","also","supports","to","compute","the","mean",",","std",",","min","and","max","intensities","of","the","input",",","and","these","statistics","are","helpful","for","image","normalization","(","as","parameters","of","`","monai.transforms.ScaleIntensityRanged","`","and","`","monai.transforms.NormalizeIntensityd","`",")",".","The","algorithm","for","calculation","refers","to",":","`","Automated","Design","of","Deep","Learning","Methods","for","Biomedical","Image","Segmentation","<","https",":","\/\/arxiv.org\/abs\/1904.08128",">","`","_","."]
docstr: This function is used to collect the metadata for all images of the dataset.
docstr_tok: ["This","function","is","used","to","collect","the","metadata","for","all","images","of","the","dataset","."]
code: def collect_meta_data(self):
      """
      This function is used to collect the metadata for all images of the dataset.
      """
  
      for data in self.data_loader:
          if isinstance(data[self.image_key], MetaTensor):
              meta_dict = data[self.image_key].meta
          elif self.meta_key in data:
              meta_dict = data[self.meta_key]
          else:
              warnings.warn(
                  f"To collect metadata for the dataset, `{self.meta_key}` or `data.meta` must exist."
              )
          self.all_meta_data.append(meta_dict)
  
file_path: MONAI/monai/data/dataset_summary.py
imports: from __future__ import annotations
  import warnings
  from itertools import chain
  import numpy
  import torch
  from monai.config import KeysCollection
  from monai.data.dataloader import DataLoader
  from monai.data.dataset import Dataset
  from monai.data.meta_tensor import MetaTensor
  from monai.data.utils import affine_to_spacing
  from monai.transforms import concatenate
  from monai.utils import PostFix, convert_data_type, convert_to_tensor
label_desc: Use image node_id 2 for calling the DatasetSummary obj's underlying member method code with example usage: obj.collect_meta_data() without return types