[vtkusers] Monitor filter
    Massinissa Bandou 
    Massinissa.Bandou at USherbrooke.ca
       
    Sat Feb 22 15:56:03 EST 2014
    
    
  
Hello everyone!
Can someone tell me what's wrong with this code? I cant display the mean
distance
thx for your help!
Massi
 vtkSmartPointer<vtkIterativeClosestPointTransform> icp =
vtkSmartPointer<vtkIterativeClosestPointTransform>::New();
	icp->SetSource(sourceData);
	icp->SetTarget(targetData);
	icp->SetMaximumNumberOfIterations(40);
        icp->GetLandmarkTransform()->SetModeToRigidBody();
	icp->CheckMeanDistanceOn();
        icp->SetMeanDistanceModeToRMS();
icp->AddObserver(vtkCommand::ProgressEvent,this,&Surface_Registration::ICPCallback);
        icp->Modified();
        icp->Update();
void Surface_Registration::ICPCallback(vtkObject* caller,long unsigned int
eventId,void* callData)
{
	vtkIterativeClosestPointTransform* progress =
reinterpret_cast<vtkIterativeClosestPointTransform*>(caller);
	cout<<progress->GetMeanDistance()<<endl;
}
</h3>
--
View this message in context: http://vtk.1045678.n5.nabble.com/Monitor-filter-tp5726082.html
Sent from the VTK - Users mailing list archive at Nabble.com.
    
    
More information about the vtkusers
mailing list