[vtkusers] Re: vtkusers Digest, Vol 43, Issue 16

roberto chumbimuni rcchumbimuni at gmail.com
Thu Nov 15 13:17:48 EST 2007


I would like to know the problem with this code that compiles but does not
run


double [,] x2={{0,0,0}, {1,0,0}, {1,1,0}, {0,1,0}, {0,0,1}, {1,0,1},
{1,1,1}, {0,1,1}};

double[][] x3 = new double[8][];

for (i = 0; i < x3.Length; i++)

{

x3[i] = new double[3];

for (j = 0; j < 3; j++) x3[i][j] = x2[i, j];

}

vtkPoints points1 = new vtkPoints();

vtkPolyData cube1 = new vtkPolyData();

vtkPoints points2 = new vtkPoints();

vtkPolyData cube2 = new vtkPolyData();

for ( i=0; i<8; i++) points1.InsertPoint(i,x3[i]);

for ( i=0; i<8; i++) points2.InsertPoint(i,x3[i]);

cube1.SetPoints(points1);

cube2.SetPoints(points2);

vtkIterativeClosestPointTransform icp = new
vtkIterativeClosestPointTransform();

icp.SetSource(cube1);

icp.SetTarget(cube2);

// icp->DebugOn();

icp.SetMaximumNumberOfIterations(100);

icp.SetMaximumNumberOfLandmarks(cube1.GetNumberOfPoints());

icp.SetCheckMeanDistance(1);

icp.SetMaximumMeanDistance( 0.0000001);

icp.GetLandmarkTransform().SetModeToRigidBody();

icp.Update();

thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071115/4c431640/attachment.htm>


More information about the vtkusers mailing list