class_docstr: Event handler triggered on completing every iteration to calculate and save the probability map.
  This handler use metadata from MetaTensor to create the probability map. This can be simply achieved by using
  `monai.data.SlidingPatchWSIDataset` or `monai.data.MaskedPatchWSIDataset` as the dataset.
docstr: Args:
      output_dir: output directory to save probability maps.
      output_postfix: a string appended to all output file names.
      prob_key: the key associated to the probability output of the model
      dtype: the data type in which the probability map is stored. Default np.float64.
      name: identifier of logging.logger to use, defaulting to `engine.logger`.
docstr_tok: ["Args",":","output_dir",":","output","directory","to","save","probability","maps",".","output_postfix",":","a","string","appended","to","all","output","file","names",".","prob_key",":","the","key","associated","to","the","probability","output","of","the","model","dtype",":","the","data","type","in","which","the","probability","map","is","stored",".","Default","np.float64",".","name",":","identifier","of","logging.logger","to","use",",","defaulting","to","`","engine.logger","`","."]
code: def __init__(
      self,
      output_dir: str = "./",
      output_postfix: str = "",
      prob_key: str = "pred",
      dtype: DtypeLike = np.float64,
      name: str | None = None,
  ) -> None:
      """
      Args:
          output_dir: output directory to save probability maps.
          output_postfix: a string appended to all output file names.
          prob_key: the key associated to the probability output of the model
          dtype: the data type in which the probability map is stored. Default np.float64.
          name: identifier of logging.logger to use, defaulting to `engine.logger`.
  
      """
      self.folder_layout = FolderLayout(
          output_dir=output_dir,
          postfix=output_postfix,
          extension=".npy",
          parent=False,
          makedirs=True,
          data_root_dir="",
      )
  
      self.logger = logging.getLogger(name)
      self._name = name
      self.prob_key = prob_key
      self.dtype = dtype
      self.prob_map: dict[str, np.ndarray] = {}
      self.counter: dict[str, int] = {}
      self.num_done_images: int = 0
      self.num_images: int = 0
      self.lock = threading.Lock()
  
file_path: MONAI/monai/handlers/probability_maps.py
imports: from __future__ import annotations
  import logging
  import threading
  from typing import TYPE_CHECKING
  import numpy
  from monai.config import DtypeLike, IgniteInfo
  from monai.data.folder_layout import FolderLayout
  from monai.utils import ProbMapKeys, min_version, optional_import
  from monai.utils.enums import CommonKeys
label_desc: Use image node_id 1 to create a new ProbMapProducer object  with example: obj = ProbMapProducer(output_dir, output_postfix, prob_key, dtype, name)