[vtkusers] Trying to use vtkSurfaceReconstructionFilter
Anestis Koutsoudis
akoutsou at ipet.gr
Mon Sep 29 11:52:44 EDT 2008
Hi all,
I have been trying to feed an instance of vtkSurfaceReconstructionFilter
with a vtkPolyData that has been assigned a vtkPoints. Here is the
following code.
The problem is that it always returns a CUBE not an approximation even
erroneous
of the point cloud.
Any ideas on this?
Cheers
vtkPoints *points = vtkPoints::New();
fp=fopen(argv[1],"r");
int counter = 0;
while(!feof(fp)) {
fscanf(fp,"%e,%e,%e\n", &x,&y,&z); // Read an
X,Y,Z points file
points->InsertPoint(counter,x,y,z);
counter++;
}
fclose(fp);
points->Modified();
vtkPolyData *pData = vtkPolyData::New();
pData->SetPoints(points);
pData->Update();
vtkSurfaceReconstructionFilter *delaunay =
vtkSurfaceReconstructionFilter::New();
delaunay->SetInput(pData);
delaunay->SetSampleSpacing(0.5);
delaunay->Update();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080929/ce8458ff/attachment.htm>
More information about the vtkusers
mailing list