docstr: Sum of Squared Differences (SSD) Metric
  
  Similarity metric for (mono-modal) nonlinear image registration defined
  by the sum of squared differences (SSD)
  
  Parameters
  ----------
  dim : int (either 2 or 3)
      the dimension of the image domain
  smooth : float
      smoothness parameter, the larger the value the smoother the
      deformation field
  inner_iter : int
      number of iterations to be performed at each level of the multi-
      resolution Gauss-Seidel optimization algorithm (this is not the
      number of steps per Gaussian Pyramid level, that parameter must
      be set for the optimizer, not the metric)
  step_type : string
      the displacement field step to be computed when 'compute_forward'
      and 'compute_backward' are called. Either 'demons' or
      'gauss_newton'
docstr_tok: ["Sum","of","Squared","Differences","(","SSD",")","Metric","Similarity","metric","for","(","mono-modal",")","nonlinear","image","registration","defined","by","the","sum","of","squared","differences","(","SSD",")","Parameters","--","--","--","--","--","dim",":","int","(","either","2","or","3",")","the","dimension","of","the","image","domain","smooth",":","float","smoothness","parameter",",","the","larger","the","value","the","smoother","the","deformation","field","inner_iter",":","int","number","of","iterations","to","be","performed","at","each","level","of","the","multi-","resolution","Gauss-Seidel","optimization","algorithm","(","this","is","not","the","number","of","steps","per","Gaussian","Pyramid","level",",","that","parameter","must","be","set","for","the","optimizer",",","not","the","metric",")","step_type",":","string","the","displacement","field","step","to","be","computed","when","'compute_forward'","and","'compute_backward","'","are","called",".","Either","'demons","'","or","'gauss_newton","'"]
code: def __init__(self, dim, smooth=4, inner_iter=10, step_type="demons"):
      r"""Sum of Squared Differences (SSD) Metric
  
      Similarity metric for (mono-modal) nonlinear image registration defined
      by the sum of squared differences (SSD)
  
      Parameters
      ----------
      dim : int (either 2 or 3)
          the dimension of the image domain
      smooth : float
          smoothness parameter, the larger the value the smoother the
          deformation field
      inner_iter : int
          number of iterations to be performed at each level of the multi-
          resolution Gauss-Seidel optimization algorithm (this is not the
          number of steps per Gaussian Pyramid level, that parameter must
          be set for the optimizer, not the metric)
      step_type : string
          the displacement field step to be computed when 'compute_forward'
          and 'compute_backward' are called. Either 'demons' or
          'gauss_newton'
      """
      super(SSDMetric, self).__init__(dim)
      self.smooth = smooth
      self.inner_iter = inner_iter
      self.step_type = step_type
      self.levels_below = 0
      self._connect_functions()
  
imports: import abc
  import numpy
  from numpy import gradient
  from scipy import ndimage
  from dipy.align import vector_fields
  from dipy.align import sumsqdiff
  from dipy.align import crosscorr
  from dipy.align import expectmax
  from dipy.align import floating
label_desc: Use image node_id 1 to create a new SSDMetric object from inherited base classes: SimilarityMetric with example: obj = SSDMetric(dim, smooth, inner_iter, step_type)