docstr: Assign the methods to be called according to the image dimension
  
  Assigns the appropriate functions to be called for vector field
  reorientation and displacement field steps according to the
  dimension of the input images and the select type of step (either
  Demons or Gauss Newton)
docstr_tok: ["Assign","the","methods","to","be","called","according","to","the","image","dimension","Assigns","the","appropriate","functions","to","be","called","for","vector","field","reorientation","and","displacement","field","steps","according","to","the","dimension","of","the","input","images","and","the","select","type","of","step","(","either","Demons","or","Gauss","Newton",")"]
code: def _connect_functions(self):
      r"""Assign the methods to be called according to the image dimension
  
      Assigns the appropriate functions to be called for vector field
      reorientation and displacement field steps according to the
      dimension of the input images and the select type of step (either
      Demons or Gauss Newton)
      """
      if self.dim == 2:
          self.reorient_vector_field = vfu.reorient_vector_field_2d
      elif self.dim == 3:
          self.reorient_vector_field = vfu.reorient_vector_field_3d
      else:
          raise ValueError(
              "SSD Metric not defined for dim. %d" % self.dim
          )
  
      if self.step_type == "gauss_newton":
          self.compute_step = self.compute_gauss_newton_step
      elif self.step_type == "demons":
          self.compute_step = self.compute_demons_step
      else:
          raise ValueError("Opt. step %s not defined" % self.step_type)
  
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 2 for calling the SSDMetric obj's underlying member method code with example usage: obj._connect_functions() without return types