create tetrahedral from a set of points using vtkDelaunay3D


How do I create tetrahedral from a set of points using vtkDelaunay3D? This is what I have come up with so far.

vtkDelaunay3D* getDelaunayTets; // create instance of vtkDelaunay3D
vtkPoints* points;
points=vtkPoints::New(); // initialise points (online example - not clear from doc)
points->InsertNextPoint(0,0,1); // insert points (online example - not sure if points r added)
vtkUnstructuredGrid* Mesh; vtkIdType id; double x[3]; vtkIdList* holeTetras;
getDelaunayTets->InsertPoint(Mesh, points, id, x, holeTetras);

I get an initialisation error for holeTetras and I am not sure how to initialise holeTetras.

First you need to create a point set, then set it at input to the Delaunay filter, execute the filter, then retrieve the unstructured grid output.

Read the VTK textbook and check out related VTK examples.

Thank you the suggestions.
If I understand your steps correctly, I need to create points, pass the points to Delaunay and execute a function within Delaunay that returns the mesh.

I have had a look at the vtkDelaunay3D cxx example which reads in points from a file and uses the SetInputConnection function to pass outputs of a filter as input to another filter. What remains unclear to me is how to pass a vtkPointSet (or vtkPoint, used by me) to vtkDelaunay3D. Could you kindly help with this? My c++ skills are still under development. Thanks.

It is shown in hundreds of examples how to set input connection or input data in a filter. There is even an example specifically for using Delaunay3D filter.

Please spend some time reading the freely available VTK textbook and VTK examples.

Thank you for your responses; they are much appreciated.