class_docstr: Computes the Multi-Scale Structural Similarity Index Measure (MS-SSIM).
  
  MS-SSIM reference paper:
      Wang, Z., Simoncelli, E.P. and Bovik, A.C., 2003, November. "Multiscale structural
      similarity for image quality assessment." In The Thirty-Seventh Asilomar Conference
      on Signals, Systems & Computers, 2003 (Vol. 2, pp. 1398-1402). IEEE
  
  Args:
      spatial_dims: number of spatial dimensions of the input images.
      data_range: value range of input images. (usually 1.0 or 255)
      kernel_type: type of kernel, can be "gaussian" or "uniform".
      kernel_size: size of kernel
      kernel_sigma: standard deviation for Gaussian kernel.
      k1: stability constant used in the luminance denominator
      k2: stability constant used in the contrast denominator
      weights: parameters for image similarity and contrast sensitivity at different resolution scores.
      reduction: define the mode to reduce metrics, will only execute reduction on `not-nan` values,
          available reduction modes: {``"none"``, ``"mean"``, ``"sum"``, ``"mean_batch"``, ``"sum_batch"``,
          ``"mean_channel"``, ``"sum_channel"``}, default to ``"mean"``. if "none", will not do reduction
      get_not_nans: whether to return the `not_nans` count, if True, aggregate() returns (metric, not_nans)
class_docstr_tok: ["Computes","the","Multi-Scale","Structural","Similarity","Index","Measure","(","MS-SSIM",")",".","MS-SSIM","reference","paper",":","Wang",",","Z.",",","Simoncelli",",","E.P",".","and","Bovik",",","A.C.",",","2003",",","November",".","``","Multiscale","structural","similarity","for","image","quality","assessment",".","''","In","The","Thirty-Seventh","Asilomar","Conference","on","Signals",",","Systems","&","Computers",",","2003","(","Vol",".","2",",","pp",".","1398-1402",")",".","IEEE","Args",":","spatial_dims",":","number","of","spatial","dimensions","of","the","input","images",".","data_range",":","value","range","of","input","images",".","(","usually","1.0","or","255",")","kernel_type",":","type","of","kernel",",","can","be","``","gaussian","''","or","``","uniform","''",".","kernel_size",":","size","of","kernel","kernel_sigma",":","standard","deviation","for","Gaussian","kernel",".","k1",":","stability","constant","used","in","the","luminance","denominator","k2",":","stability","constant","used","in","the","contrast","denominator","weights",":","parameters","for","image","similarity","and","contrast","sensitivity","at","different","resolution","scores",".","reduction",":","define","the","mode","to","reduce","metrics",",","will","only","execute","reduction","on","`","not-nan","`","values",",","available","reduction","modes",":","{","``","``","none","''","``",",","``","``","mean","''","``",",","``","``","sum","''","``",",","``","``","mean_batch","''","``",",","``","``","sum_batch","''","``",",","``","``","mean_channel","''","``",",","``","``","sum_channel","''","``","}",",","default","to","``","``","mean","''","``",".","if","``","none","''",",","will","not","do","reduction","get_not_nans",":","whether","to","return","the","`","not_nans","`","count",",","if","True",",","aggregate","(",")","returns","(","metric",",","not_nans",")"]
code: def __init__(
      self,
      spatial_dims: int,
      data_range: float = 1.0,
      kernel_type: KernelType | str = KernelType.GAUSSIAN,
      kernel_size: int | Sequence[int] = 11,
      kernel_sigma: float | Sequence[float] = 1.5,
      k1: float = 0.01,
      k2: float = 0.03,
      weights: Sequence[float] = (
          0.0448,
          0.2856,
          0.3001,
          0.2363,
          0.1333,
      ),
      reduction: MetricReduction | str = MetricReduction.MEAN,
      get_not_nans: bool = False,
  ) -> None:
      super().__init__(reduction=reduction, get_not_nans=get_not_nans)
  
      self.spatial_dims = spatial_dims
      self.data_range = data_range
      self.kernel_type = kernel_type
  
      if not isinstance(kernel_size, Sequence):
          kernel_size = ensure_tuple_rep(kernel_size, spatial_dims)
      self.kernel_size = kernel_size
  
      if not isinstance(kernel_sigma, Sequence):
          kernel_sigma = ensure_tuple_rep(kernel_sigma, spatial_dims)
      self.kernel_sigma = kernel_sigma
  
      self.k1 = k1
      self.k2 = k2
      self.weights = weights
  
imports: from __future__ import annotations
  import math
  from abc import abstractmethod
  from collections.abc import Callable, Sequence
  from functools import partial
  from typing import Any
  import torch
  import torch.nn.functional
  from monai.metrics.utils import do_metric_reduction
  from monai.utils import MetricReduction, StrEnum, convert_data_type, ensure_tuple_rep
  from monai.utils.type_conversion import convert_to_dst_type
  from .metric import CumulativeIterationMetric
label_desc: Use image node_id 1 to create a new MultiScaleSSIMMetric object from inherited base classes: RegressionMetric with example: obj = MultiScaleSSIMMetric(spatial_dims, data_range, kernel_type, kernel_size, kernel_sigma, k1, k2, weights, reduction, get_not_nans)