[vtkusers]ask about vtkIterativeClosestPointTransform
Tim Hutton
tim.hutton at gmail.com
Sat Sep 15 05:18:43 EDT 2007
Hello,
ICP is for polygonal meshes, as you've seen. To work with medical
images, you will probably need a different algorithm. ITK.org is more
suited to these tasks than VTK.
One exception is with 3D volume images, where it is sensible to
contour it first at a certain intensity level, and then use ICP to
register the two together. But even there a different image
registration algorithm might work better.
Tim
On 15/09/2007, m26404030 at john.petra.ac.id <m26404030 at john.petra.ac.id> wrote:
> hey,i think i have the same problem with u john..
> can someone please help us about this problem.
> pliz help us...TT
>
> Thanx in advance. =p
>
>
> Quoting John Doe <vtkuser at yahoo.com>:
>
> > 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.
> > i have tried it but still fail to get the right result..
> >
> > please help me..
> > this is part of my code(still wrong)
> >
> > //
> > vtkRenderer *aRenderer = vtkRenderer::New();
> > vtkRenderWindow *renWin = vtkRenderWindow::New();
> > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
> > renWin->AddRenderer(aRenderer);
> > iren->SetRenderWindow(renWin);
> >
> > vtkDICOMImageReader *source=vtkDICOMImageReader::New();
> > source->SetFileName("source.dcm");
> > source->Update();
> >
> > vtkDICOMImageReader *target=vtkDICOMImageReader ::New();
> > target->SetFileName("target.dcm");
> > target->Update();
> >
> >
> >
> vtkIterativeClosestPointTransform*icp=vtkIterativeClosestPointTransform::New();
> > icp->SetSource(source->GetOutput());
> > icp->SetTarget(target->GetOutput());
> >
> > /////////dont understand these parts!! i just copied it from the
> > references i found
> > icp->SetCheckMeanDistance(1);
> > icp->SetMaximumMeanDistance(0.01);
> > icp->SetMaximumNumberOfIterations(30);
> > icp->SetMaximumNumberOfLandmarks(50);
> > icp->GetLandmarkTransform()->SetModeToRigidBody();
> > icp->CheckMeanDistanceOn();
> > icp->StartByMatchingCentroidsOn();
> > icp->Update();
> > /////////////////////////////////
> >
> > vtkTransformPolyDataFilter *filter=vtkTransformPolyDataFilter::New();
> > filter->SetTransform(icp);
> > filter->SetInput(source->GetOutput());
> >
> >
> > vtkPolyDataMapper *map=vtkPolyDataMapper::New();
> > map->SetInput(filter->GetOutput());
> >
> > vtkActor *actor=vtkActor::New();
> > actor->SetMapper(map);
> >
> > aRenderer->AddActor(actor);
> >
> > renWin->Render();
> > iren->Start();
> > //
> >
> >
> >
> > thanx a lot =)
> >
> > Regards, John.
> >
> >
> > ---------------------------------
> > Check out the hottest 2008 models today at Yahoo! Autos.
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Tim Hutton - http://www.sq3.org.uk
Take the Organic Builder challenge -
http://www.sq3.org.uk/Evolution/Squirm3/OrganicBuilder/
More information about the vtkusers
mailing list