FreeMat
vtkIterativeClosestPointTransform

Section: Visualization Toolkit Hybrid Classes

Usage

Match two surfaces using the iterative closest point (ICP) algorithm. The core of the algorithm is to match each vertex in one surface with the closest surface point on the other, then apply the transformation that modify one surface to best match the other (in a least square sense). This has to be iterated to get proper convergence of the surfaces. .SECTION Note Use vtkTransformPolyDataFilter to apply the resulting ICP transform to your data. You might also set it to your actor's user transform. .SECTION Note This class makes use of vtkLandmarkTransform internally to compute the best fit. Use the GetLandmarkTransform member to get a pointer to that transform and set its parameters. You might, for example, constrain the number of degrees of freedom of the solution (i.e. rigid body, similarity, etc.) by checking the vtkLandmarkTransform documentation for its SetMode member.

To create an instance of class vtkIterativeClosestPointTransform, simply invoke its constructor as follows

  obj = vtkIterativeClosestPointTransform

Methods

The class vtkIterativeClosestPointTransform has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkIterativeClosestPointTransform class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkIterativeClosestPointTransform = obj.NewInstance ()
  • vtkIterativeClosestPointTransform = obj.SafeDownCast (vtkObject o)
  • obj.SetSource (vtkDataSet source) - Specify the source and target data sets.
  • obj.SetTarget (vtkDataSet target) - Specify the source and target data sets.
  • vtkDataSet = obj.GetSource () - Specify the source and target data sets.
  • vtkDataSet = obj.GetTarget () - Specify the source and target data sets.
  • obj.SetLocator (vtkCellLocator locator) - Set/Get a spatial locator for speeding up the search process. An instance of vtkCellLocator is used by default.
  • vtkCellLocator = obj.GetLocator () - Set/Get a spatial locator for speeding up the search process. An instance of vtkCellLocator is used by default.
  • obj.SetMaximumNumberOfIterations (int ) - Set/Get the maximum number of iterations. Default is 50.
  • int = obj.GetMaximumNumberOfIterations () - Set/Get the maximum number of iterations. Default is 50.
  • int = obj.GetNumberOfIterations () - Get the number of iterations since the last update
  • obj.SetCheckMeanDistance (int ) - Force the algorithm to check the mean distance between two iterations. Default is Off.
  • int = obj.GetCheckMeanDistance () - Force the algorithm to check the mean distance between two iterations. Default is Off.
  • obj.CheckMeanDistanceOn () - Force the algorithm to check the mean distance between two iterations. Default is Off.
  • obj.CheckMeanDistanceOff () - Force the algorithm to check the mean distance between two iterations. Default is Off.
  • obj.SetMeanDistanceMode (int ) - Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS
  • int = obj.GetMeanDistanceModeMinValue () - Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS
  • int = obj.GetMeanDistanceModeMaxValue () - Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS
  • int = obj.GetMeanDistanceMode () - Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS
  • obj.SetMeanDistanceModeToRMS () - Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS
  • obj.SetMeanDistanceModeToAbsoluteValue () - Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS
  • string = obj.GetMeanDistanceModeAsString () - Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS
  • obj.SetMaximumMeanDistance (double ) - Set/Get the maximum mean distance between two iteration. If the mean distance is lower than this, the convergence stops. The default is 0.01.
  • double = obj.GetMaximumMeanDistance () - Set/Get the maximum mean distance between two iteration. If the mean distance is lower than this, the convergence stops. The default is 0.01.
  • double = obj.GetMeanDistance () - Get the mean distance between the last two iterations.
  • obj.SetMaximumNumberOfLandmarks (int ) - Set/Get the maximum number of landmarks sampled in your dataset. If your dataset is dense, then you will typically not need all the points to compute the ICP transform. The default is 200.
  • int = obj.GetMaximumNumberOfLandmarks () - Set/Get the maximum number of landmarks sampled in your dataset. If your dataset is dense, then you will typically not need all the points to compute the ICP transform. The default is 200.
  • obj.SetStartByMatchingCentroids (int ) - Starts the process by translating source centroid to target centroid. The default is Off.
  • int = obj.GetStartByMatchingCentroids () - Starts the process by translating source centroid to target centroid. The default is Off.
  • obj.StartByMatchingCentroidsOn () - Starts the process by translating source centroid to target centroid. The default is Off.
  • obj.StartByMatchingCentroidsOff () - Starts the process by translating source centroid to target centroid. The default is Off.
  • vtkLandmarkTransform = obj.GetLandmarkTransform () - Get the internal landmark transform. Use it to constrain the number of degrees of freedom of the solution (i.e. rigid body, similarity, etc.).
  • obj.Inverse () - Invert the transformation. This is done by switching the source and target.
  • vtkAbstractTransform = obj.MakeTransform () - Make another transform of the same type.