i want to do 2d medical image registration on two images and i think i can use vtkIterativeClosestPointTransform to find the correspondence point between the two images. the first question is can i use the images as input? because i read that the input must be vtkPolyData type.<br>i have tried it but still fail to get the right result..<br><br>please help me..<br>this is part of my code(still wrong)<br><br>//<br>&nbsp;&nbsp;&nbsp; vtkRenderer *aRenderer = vtkRenderer::New();<br>&nbsp;&nbsp;&nbsp; vtkRenderWindow *renWin = vtkRenderWindow::New();<br>&nbsp;&nbsp;&nbsp; vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>&nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer(aRenderer);<br>&nbsp;&nbsp;&nbsp; iren-&gt;SetRenderWindow(renWin);&nbsp;&nbsp; &nbsp;&nbsp;  <br><br>&nbsp;&nbsp;&nbsp; vtkDICOMImageReader *source=vtkDICOMImageReader::New();<br>&nbsp;&nbsp;&nbsp; source-&gt;SetFileName("source.dcm");<br>&nbsp;&nbsp;&nbsp;
 source-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; vtkDICOMImageReader *target=vtkDICOMImageReader ::New();<br>&nbsp;&nbsp;&nbsp; target-&gt;SetFileName("target.dcm");<br>&nbsp;&nbsp;&nbsp; target-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; vtkIterativeClosestPointTransform*icp=vtkIterativeClosestPointTransform::New();<br>&nbsp;&nbsp;&nbsp; icp-&gt;SetSource(source-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; icp-&gt;SetTarget(target-&gt;GetOutput());<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; /////////dont understand these parts!! i just copied it from the references i found<br>&nbsp;&nbsp;&nbsp; icp-&gt;SetCheckMeanDistance(1);<br>&nbsp;&nbsp;&nbsp; icp-&gt;SetMaximumMeanDistance(0.01);<br>&nbsp;&nbsp;&nbsp; icp-&gt;SetMaximumNumberOfIterations(30);<br>&nbsp;&nbsp;&nbsp; icp-&gt;SetMaximumNumberOfLandmarks(50);<br>&nbsp;&nbsp;&nbsp; icp-&gt;GetLandmarkTransform()-&gt;SetModeToRigidBody();<br>&nbsp;&nbsp;&nbsp;
 icp-&gt;CheckMeanDistanceOn();<br>&nbsp;&nbsp;&nbsp; icp-&gt;StartByMatchingCentroidsOn();<br>&nbsp;&nbsp;&nbsp; icp-&gt;Update();<br>&nbsp;&nbsp;&nbsp; /////////////////////////////////<br><br>&nbsp;&nbsp;&nbsp; vtkTransformPolyDataFilter *filter=vtkTransformPolyDataFilter::New();<br>&nbsp;&nbsp;&nbsp; filter-&gt;SetTransform(icp);<br>&nbsp;&nbsp;&nbsp; filter-&gt;SetInput(source-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; vtkPolyDataMapper *map=vtkPolyDataMapper::New();<br>&nbsp;&nbsp;&nbsp; map-&gt;SetInput(filter-&gt;GetOutput());<br><br>&nbsp;&nbsp;&nbsp; vtkActor *actor=vtkActor::New();<br>&nbsp;&nbsp;&nbsp; actor-&gt;SetMapper(map);<br><br>&nbsp;&nbsp;&nbsp; aRenderer-&gt;AddActor(actor);<br><br>&nbsp;&nbsp;&nbsp; renWin-&gt;Render();<br>&nbsp;&nbsp;&nbsp; iren-&gt;Start();<br>//<br><br><br><br>thanx a lot =)<br><br>Regards, John.<br><p>&#32;
      <hr size=1> <a href="http://us.rd.yahoo.com/evt=51201/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE5NWVzZGVyBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDYXV0b3MtbmV3Y2Fy
">Check out </a> the hottest 2008 models today at Yahoo! Autos.