[vtkusers] Trying to use vtkSurfaceReconstructionFilter

Dominik Szczerba dominik at itis.ethz.ch
Mon Sep 29 11:58:15 EDT 2008


See the alpha parameter in the vtkDelaunay3D.
- Dominik

On Monday 29 September 2008 05:52:44 pm Anestis Koutsoudis wrote:
> 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();



-- 
Dominik Szczerba, Ph.D.
Computational Physics Group
Foundation for Research on Information Technologies in Society
http://www.itis.ethz.ch



More information about the vtkusers mailing list