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> vtkRenderer *aRenderer = vtkRenderer::New();<br> vtkRenderWindow *renWin = vtkRenderWindow::New();<br> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br> renWin->AddRenderer(aRenderer);<br> iren->SetRenderWindow(renWin); <br><br> vtkDICOMImageReader *source=vtkDICOMImageReader::New();<br> source->SetFileName("source.dcm");<br>
source->Update();<br><br> vtkDICOMImageReader *target=vtkDICOMImageReader ::New();<br> target->SetFileName("target.dcm");<br> target->Update();<br><br> vtkIterativeClosestPointTransform*icp=vtkIterativeClosestPointTransform::New();<br> icp->SetSource(source->GetOutput());<br> icp->SetTarget(target->GetOutput());<br> <br> /////////dont understand these parts!! i just copied it from the references i found<br> icp->SetCheckMeanDistance(1);<br> icp->SetMaximumMeanDistance(0.01);<br> icp->SetMaximumNumberOfIterations(30);<br> icp->SetMaximumNumberOfLandmarks(50);<br> icp->GetLandmarkTransform()->SetModeToRigidBody();<br>
icp->CheckMeanDistanceOn();<br> icp->StartByMatchingCentroidsOn();<br> icp->Update();<br> /////////////////////////////////<br><br> vtkTransformPolyDataFilter *filter=vtkTransformPolyDataFilter::New();<br> filter->SetTransform(icp);<br> filter->SetInput(source->GetOutput());<br> <br><br> vtkPolyDataMapper *map=vtkPolyDataMapper::New();<br> map->SetInput(filter->GetOutput());<br><br> vtkActor *actor=vtkActor::New();<br> actor->SetMapper(map);<br><br> aRenderer->AddActor(actor);<br><br> renWin->Render();<br> iren->Start();<br>//<br><br><br><br>thanx a lot =)<br><br>Regards, John.<br><p> 
<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.