[vtkusers] Registration code example
David Doria
daviddoria at gmail.com
Tue Feb 10 12:40:46 EST 2009
I think you just need to call Update()
...
reca->SetMaximumNumberOfIterations(50);
reca->Modified();
reca->Update();
vtkTransformPolyDataFilter *treca = vtkTransformPolyDataFilter ::New();
...
On Fri, Jan 30, 2009 at 6:55 AM, Nour Mestiri <nourmestiri at yahoo.fr> wrote:
> Hi all vtk users.
> I have a code sample whish is supposed to do the registration of 2 objects
> and display the result.
> When i run it, i have only the second object chosen which is displayed..
> Can you tell me where exactly is the default in this code?
> Thank you sooo much
>
>
> vtkXMLPolyDataReader *object1 = vtkXMLPolyDataReader::New();
> object1->SetFileName(File1);
> object1->Update();
>
> vtkXMLPolyDataReader *object2 = vtkXMLPolyDataReader::New();
> object2->SetFileName(File2);
> objetc2->Update();
>
> //Registration
> vtkIterativeClosestPointTransform *reca =
> vtkIterativeClosestPointTransform::New();
> reca->SetSource(object1->GetOutput());
> reca->SetTarget(object2->GetOutput());
> reca->SetMaximumNumberOfIterations(50);
>
> vtkTransformPolyDataFilter *treca = vtkTransformPolyDataFilter ::New();
> treca->SetInput(object1->GetOutput());
> treca->SetTransform(reca);
>
>
>
> _______________________________________________
> 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
>
>
--
Thanks,
David
More information about the vtkusers
mailing list