class_docstr: Deformable point cloud registration.
  
  Attributes
  ----------
  X: numpy array
      NxD array of target points.
  
  Y: numpy array
      MxD array of source points.
  
  TY: numpy array
      MxD array of transformed source points.
  
  sigma2: float (positive)
      Initial variance of the Gaussian mixture model.
  
  N: int
      Number of target points.
  
  M: int
      Number of source points.
  
  D: int
      Dimensionality of source and target points
  
  iteration: int
      The current iteration throughout registration.
  
  max_iterations: int
      Registration will terminate once the algorithm has taken this
      many iterations.
  
  tolerance: float (positive)
      Registration will terminate once the difference between
      consecutive objective function values falls within this tolerance.
  
  w: float (between 0 and 1)
      Contribution of the uniform distribution to account for outliers.
      Valid values span 0 (inclusive) and 1 (exclusive).
  
  q: float
      The objective function value that represents the misalignment between
      source and target point clouds.
  
  diff: float (positive)
      The absolute difference between the current and previous objective
      function values.
  
  P: numpy array
      MxN array of probabilities.
      P[m, n] represents the probability that the m-th source point
      corresponds to the n-th target point.
  
  Pt1: numpy array
      Nx1 column array. Multiplication result between the transpose of P
      and a column vector of all 1s.
  
  P1: numpy array
      Mx1 column array.
      Multiplication result between P and a column vector of all 1s.
  
  Np: float (positive)
      The sum of all elements in P.
  
  alpha: float (positive)
      Represents the trade-off between the goodness of maximum likelihoo
      fit and regularization.
  
  beta: float(positive)
      Width of the Gaussian kernel.
  
  low_rank: bool
      Whether to use low rank approximation.
  
  num_eig: int
      Number of eigenvectors to use in lowrank calculation.
class_docstr_tok: ["Deformable","point","cloud","registration",".","Attributes","--","--","--","--","--","X",":","numpy","array","NxD","array","of","target","points",".","Y",":","numpy","array","MxD","array","of","source","points",".","TY",":","numpy","array","MxD","array","of","transformed","source","points",".","sigma2",":","float","(","positive",")","Initial","variance","of","the","Gaussian","mixture","model",".","N",":","int","Number","of","target","points",".","M",":","int","Number","of","source","points",".","D",":","int","Dimensionality","of","source","and","target","points","iteration",":","int","The","current","iteration","throughout","registration",".","max_iterations",":","int","Registration","will","terminate","once","the","algorithm","has","taken","this","many","iterations",".","tolerance",":","float","(","positive",")","Registration","will","terminate","once","the","difference","between","consecutive","objective","function","values","falls","within","this","tolerance",".","w",":","float","(","between","0","and","1",")","Contribution","of","the","uniform","distribution","to","account","for","outliers",".","Valid","values","span","0","(","inclusive",")","and","1","(","exclusive",")",".","q",":","float","The","objective","function","value","that","represents","the","misalignment","between","source","and","target","point","clouds",".","diff",":","float","(","positive",")","The","absolute","difference","between","the","current","and","previous","objective","function","values",".","P",":","numpy","array","MxN","array","of","probabilities",".","P","[","m",",","n","]","represents","the","probability","that","the","m-th","source","point","corresponds","to","the","n-th","target","point",".","Pt1",":","numpy","array","Nx1","column","array",".","Multiplication","result","between","the","transpose","of","P","and","a","column","vector","of","all","1s",".","P1",":","numpy","array","Mx1","column","array",".","Multiplication","result","between","P","and","a","column","vector","of","all","1s",".","Np",":","float","(","positive",")","The","sum","of","all","elements","in","P.","alpha",":","float","(","positive",")","Represents","the","trade-off","between","the","goodness","of","maximum","likelihoo","fit","and","regularization",".","beta",":","float","(","positive",")","Width","of","the","Gaussian","kernel",".","low_rank",":","bool","Whether","to","use","low","rank","approximation",".","num_eig",":","int","Number","of","eigenvectors","to","use","in","lowrank","calculation","."]
docstr: Perform the EM registration.
  
  Parameters
  ----------
  callback: function
      A function that will be called after each iteration.
      Can be used to visualize the registration process.
  
  Returns
  -------
  self.TY: numpy array
      MxD array of transformed source points.
  
  registration_parameters:
      Returned params dependent on registration method used.
docstr_tok: ["Perform","the","EM","registration",".","Parameters","--","--","--","--","--","callback",":","function","A","function","that","will","be","called","after","each","iteration",".","Can","be","used","to","visualize","the","registration","process",".","Returns","--","--","--","-","self.TY",":","numpy","array","MxD","array","of","transformed","source","points",".","registration_parameters",":","Returned","params","dependent","on","registration","method","used","."]
code: def register(self, callback=lambda **kwargs: None):
      """
      Perform the EM registration.
  
      Parameters
      ----------
      callback: function
          A function that will be called after each iteration.
          Can be used to visualize the registration process.
  
      Returns
      -------
      self.TY: numpy array
          MxD array of transformed source points.
  
      registration_parameters:
          Returned params dependent on registration method used.
      """
      self.transform_point_cloud()
      while (
          self.iteration < self.max_iterations
          and self.diff > self.tolerance
      ):
          self.iterate()
          if callable(callback):
              kwargs = {
                  "iteration": self.iteration,
                  "error": self.q,
                  "X": self.X,
                  "Y": self.TY,
              }
              callback(**kwargs)
  
      return self.TY, self.get_registration_parameters()
  
file_path: dipy/dipy/align/cpd.py
imports: import numpy
  import numbers
  from warnings import warn
label_desc: Use image node_id 2 for calling the DeformableRegistration obj's underlying member method code with example usage: obj.register(callback) and returns: self,  self