docstr: Assign the methods to be called according to the image dimension
  
  Assigns the appropriate functions to be called for precomputing the
  cross-correlation factors according to the dimension of the input
  images
docstr_tok: ["Assign","the","methods","to","be","called","according","to","the","image","dimension","Assigns","the","appropriate","functions","to","be","called","for","precomputing","the","cross-correlation","factors","according","to","the","dimension","of","the","input","images"]
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 precomputing the
      cross-correlation factors according to the dimension of the input
      images
      """
      if self.dim == 2:
          self.precompute_factors = cc.precompute_cc_factors_2d
          self.compute_forward_step = cc.compute_cc_forward_step_2d
          self.compute_backward_step = cc.compute_cc_backward_step_2d
          self.reorient_vector_field = vfu.reorient_vector_field_2d
      elif self.dim == 3:
          self.precompute_factors = cc.precompute_cc_factors_3d
          self.compute_forward_step = cc.compute_cc_forward_step_3d
          self.compute_backward_step = cc.compute_cc_backward_step_3d
          self.reorient_vector_field = vfu.reorient_vector_field_3d
      else:
          raise ValueError(
              "CC Metric not defined for dim. %d" % self.dim
          )
  
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 CCMetric obj's underlying member method code with example usage: obj._connect_functions() without return types