class_docstr: Differentiable global mutual information loss via Parzen windowing method.
  
  Reference:
      https://dspace.mit.edu/handle/1721.1/123142, Section 3.1, equation 3.1-3.5, Algorithm 1
class_docstr_tok: ["Differentiable","global","mutual","information","loss","via","Parzen","windowing","method",".","Reference",":","https",":","\/\/dspace.mit.edu\/handle\/1721.1\/123142",",","Section","3.1",",","equation","3.1-3.5",",","Algorithm","1"]
code: def parzen_windowing(
      self, pred: torch.Tensor, target: torch.Tensor
  ) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
      if self.kernel_type == "gaussian":
          (
              pred_weight,
              pred_probability,
          ) = self.parzen_windowing_gaussian(pred)
          (
              target_weight,
              target_probability,
          ) = self.parzen_windowing_gaussian(target)
      elif self.kernel_type == "b-spline":
          # a third order BSpline kernel is used for the pred image intensity PDF.
          (
              pred_weight,
              pred_probability,
          ) = self.parzen_windowing_b_spline(pred, order=3)
          # a zero order (box car) BSpline kernel is used for the target image intensity PDF.
          (
              target_weight,
              target_probability,
          ) = self.parzen_windowing_b_spline(target, order=0)
      else:
          raise ValueError
      return (
          pred_weight,
          pred_probability,
          target_weight,
          target_probability,
      )
  
imports: from __future__ import annotations
  import torch
  from torch.nn import functional
  from torch.nn.modules.loss import _Loss
  from monai.networks.layers import gaussian_1d, separable_filtering
  from monai.utils import LossReduction
  from monai.utils.module import look_up_option
label_desc: Use image node_id 2 for calling the GlobalMutualInformationLoss obj's underlying member method code with example usage: obj.parzen_windowing(pred, target) and returns: pred_weight,  pred_probability,  target_weight,  target_probability