[vtkusers] conversion vtkPolydata(triangle ) to vtkPoints

David Doria daviddoria at gmail.com
Sat May 12 08:50:28 EDT 2012


On Sat, May 12, 2012 at 6:01 AM, agatte <agatakrason at gmail.com> wrote:
> Hi All ;)
>
> I have already created mesh  and saved in vtk file
> (vtkPolydata)

.vtk is a legacy format. You should have instead used a
vtkXMLPolyDataWriter to save it to a vtp file.

> Now, I want to make IterativeClosestPointsTransform example.
> I have impression that I need convert my data to vtkPoint / vtkXMLPolydata ?

If it is saved in a vtk file as vtkPolyData, there should be no need
to convert anything, just to read it appropriately. You can't use
vtkXMLPolyDataReader (unless you correct your first step and use
vtkXMLPolyDataWriter) - you'd have to use vtkPolyDataReader (which
there is no example of, but from the documentation it sounds like it
should just work) , or something like this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/GenericDataObjectReader

> I want to do this example :
> ....
> I would appreciate for any help please ;)

What is wrong? What are the errors? etc.

David



More information about the vtkusers mailing list