class_docstr: Local squared zero-normalized cross-correlation.
  The loss is based on a moving kernel/window over the y_true/y_pred,
  within the window the square of zncc is calculated.
  The kernel can be a rectangular / triangular / gaussian window.
  The final loss is the averaged loss over all windows.
  
  Adapted from:
      https://github.com/voxelmorph/voxelmorph/blob/legacy/src/losses.py
      DeepReg (https://github.com/DeepRegNet/DeepReg)
class_docstr_tok: ["Local","squared","zero-normalized","cross-correlation",".","The","loss","is","based","on","a","moving","kernel\/window","over","the","y_true\/y_pred",",","within","the","window","the","square","of","zncc","is","calculated",".","The","kernel","can","be","a","rectangular","\/","triangular","\/","gaussian","window",".","The","final","loss","is","the","averaged","loss","over","all","windows",".","Adapted","from",":","https",":","\/\/github.com\/voxelmorph\/voxelmorph\/blob\/legacy\/src\/losses.py","DeepReg","(","https",":","\/\/github.com\/DeepRegNet\/DeepReg",")"]
code: def get_kernel_vol(self):
      vol = self.kernel
      for _ in range(self.ndim - 1):
          vol = torch.matmul(
              vol.unsqueeze(-1), self.kernel.unsqueeze(0)
          )
      return torch.sum(vol)
  
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 LocalNormalizedCrossCorrelationLoss obj's underlying member method code with example usage: obj.get_kernel_vol() and returns: torch