What I know from theory is that ICP needs a good initial state , in order to work fine. That initial state is most of the times given by vtkLandmarksTransform by selecting a small number of Landmarks and making point-to-point registration. <br><br>Regarding the number of iterations in the ICP I think you have define that. In my opinion you should cut the task and the code into small blocks and debug it untill you find which object is not having the expected parameters. Then you may <br>post a snippet of your not working code here. <br><br><b><i>samo &lt;sandra.moritz@gmx.de&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br><br>Hi guys <br><br>Thanks very much for your ideas, but unfortunately they both don't work.<br>Everytime I check the NumberOfIterations the icp needed, I get 0. My points<br>are completly random, sometimes I also have some points twice or more. What<br>could be the
 error? I understood both ideas, and in my opinion they should<br>work perfectly, but they don't <br><br>Has anybody an idea?<br><br><br><br><br><br>Emmanouil Moschidis wrote:<br>&gt; <br>&gt; hi i have posted in the past this  piece of code that should work...<br>&gt; <br>&gt; <br>&gt;      vtkPoints *cloudPoints=new vtkPoints;<br>&gt;      vtkCellArray *cloudCells=new vtkCellArray;<br>&gt;      vtkPolyData *cloudPData=new vtkPolyData;<br>&gt; <br>&gt; <br>&gt;      cloudPoints-&gt;SetDataTypeToDouble();<br>&gt;      cloudPoints-&gt;SetNumberOfPoints(numberOfVTKPoints);<br>&gt; <br>&gt; <br>&gt;      for(int i=0; i&lt;(numberOfVTKCells*3); i++)<br>&gt;      {         <br>&gt; cloudPoints-&gt;SetPoint(i,vtkStoredPointsBuffer[i].getX(),vtkStoredPointsBuffer[i].getY(),vtkStoredPointsBuffer[i].getZ());<br>&gt; <br>&gt;      }<br>&gt; <br>&gt;      cloudCells-&gt;InsertNextCell(numberOfVTKPoints);<br>&gt; <br>&gt; <br>&gt;      for (int i=0; i<numberOfVTKPoints;
 i++)=""><br>&gt;      {<br>&gt;          cloudCells-&gt;InsertCellPoint(i);<br>&gt;      }<br>&gt; <br>&gt; <br>&gt;      cloudPData-&gt;SetPoints(cloudPoints);<br>&gt;      cloudPData-&gt;SetLines(cloudCells);<br>&gt; <br>&gt; <br>&gt; the only weird thing you may see is these getX(), getY(), getZ() <br>&gt; methods.The reason why i use these methods is that i store my points in <br>&gt; std::vector<Point3D>where Point3D is a custom class for 3D points (in your<br>&gt; case you use <br>&gt; vtkPoints).<br>&gt; In general it works. Try if it works for your application too <br>&gt; <br>&gt; good luck <br>&gt; <br>&gt; <br>&gt; samo <sandra.moritz@gmx.de> wrote: <br>&gt; <br>&gt; Hello together<br>&gt; <br>&gt; I try to match a point cloud with a surface with the help of<br>&gt; vtkIterativeClosestPointAlgorithm. What I would like to know is, whether<br>&gt; and<br>&gt; how I can use a point cloud in vtk. At the moment, I am using the<br>&gt; vtkPoints<br>&gt; array to store
 all the points in. But when I want to use the icp, I need a<br>&gt; vtkDataSet. But, as I understood, the vtkDataSet always needs the cell<br>&gt; information. Is that right? I tried to use vtkUnstructuredGrid with only<br>&gt; setting points and no cells. But the icp calculated no transformation. Is<br>&gt; there a possiblility to use the icp without the cell information? As, in<br>&gt; my<br>&gt; point cloud, I don't know how the points are organized. I just would like<br>&gt; to<br>&gt; calculate a transformation from the point cloud to the surface. The icp<br>&gt; which I know from maths, is able to do that. <br>&gt; <br>&gt; Has anybody an idea?<br>&gt; -- <br>&gt; View this message in context:<br>&gt; http://www.nabble.com/ICP-with-Point-Cloud-tf3816487.html#a10804257<br>&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<br>&gt; <br>&gt; _______________________________________________<br>&gt; This is the private VTK discussion list. <br>&gt; Please
 keep messages on-topic. Check the FAQ at:<br>&gt; http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; <br>&gt; <br>&gt;        <br>&gt; ---------------------------------<br>&gt; Pinpoint customers who are looking for what you sell. <br>&gt; _______________________________________________<br>&gt; This is the private VTK discussion list. <br>&gt; Please keep messages on-topic. Check the FAQ at:<br>&gt; http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; <br>&gt; <br><br>-- <br>View this message in context: http://www.nabble.com/ICP-with-Point-Cloud-tf3816487.html#a10856362<br>Sent from the VTK - Users mailing list archive at Nabble.com.<br><br>_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at:
 http://www.vtk.org/Wiki/VTK_FAQ<br>Follow this link to subscribe/unsubscribe:<br>http://www.vtk.org/mailman/listinfo/vtkusers<br></sandra.moritz@gmx.de></Point3D></numberOfVTKPoints;></blockquote><br><p>&#32;

<hr size=1>Finding fabulous fares is fun.<br><a href="http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
">Let Yahoo! FareChase search your favorite travel sites</a> to find flight and hotel bargains.