[vtkusers] Output of ICP in VTK

dirce dirce at ipn.pt
Mon Feb 19 12:33:45 EST 2007


Hi

 

I’m having troubles implementing the ICP 

 

I have a structured points data set  and i want to match 2 slices. I use
vtkestractVOI to specify the slices. My code with ICP doesn’t work.

I’m always getting zero number of interactions and zero mean distance. I’ve
seen that some of vtk users can make it run, but i dont know whats wrong
with my code.

 

vtkStructuredPointsReader *ler=vtkStructuredPointsReader::New();

            ler->SetFileName(m_Path + "heart.vtk");

vtkStructuredPoints *strucp=vtkStructuredPoints::New();

            strucp=ler->GetOutput();

            strucp->Update();

voi1=vtkExtractVOI::New();

            voi2=vtkExtractVOI::New(); 

            voi1->SetInput(strucp);///

            voi2->SetInput(strucp);///

            voi1->SetVOI(0,31,0,31,10,10);

            voi2->SetVOI(0,31,0,31,2,2);

icp=vtkIterativeClosestPointTransform::New();

            icp->SetSource(voi1->GetOutput());

            icp->SetTarget(voi2->GetOutput());

            icp->SetMaximumNumberOfIterations(80);

            icp->SetCheckMeanDistance(1);

            icp->SetMaximumMeanDistance(0.00001);

            icp->SetMeanDistanceModeToRMS();

            //icp->SetStartByMatchingCentroids(1);

            icp->SetMaximumNumberOfLandmarks(100);

            icp->GetLandmarkTransform()->SetModeToRigidBody();

            //icp->Modified();

            //icp->Update();

            float nint=icp->GetNumberOfIterations();

 

            CString intrc;

            intrc.Format("%f",nint);

            AfxMessageBox(intrc);

 

If someone know what´s the problem i really apreciatte some help.

Thank’s in advance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070219/bc475f58/attachment.htm>


More information about the vtkusers mailing list