[vtkusers] Delaunay surface triangulation in 3D

Magnotta, Vincent A vincent-magnotta at uiowa.edu
Fri Oct 17 17:15:54 EDT 2008


I believe that you want

vtkGeometryFilter* geom = vtkGeometryFilter::New();
geom->SetInput( delny->GetOutput() );
geom->Update();


Vince

----------------------
Associate Professor 
Department of Radiology 
0453-D JCP 
200 Hawkins Drive 
Iowa City, IA 52242 
E-mail: vincent-magnotta at uiowa.edu 
Phone: 319-356-8255 Fax: 319-353-6275 
Website: http://www.radiology.uiowa.edu 



-----Original Message-----
From: vtkusers-bounces at vtk.org on behalf of Doug Hackworth
Sent: Fri 10/17/2008 4:10 PM
To: vtkusers at vtk.org
Subject: Re: [vtkusers] Delaunay surface triangulation in 3D
 

> Just run GeometryFilter without "SomeOtherMethod". I thing the default
> behaviour is wnat you want.

Hmmm.  Well, it's not working for me that way, but perhaps I'm missing 
something.  Here's my code, from the 3D Delaunay operation on down:

// Do surface triangulation
vtkDelaunay3D* delny = vtkDelaunay3D::New();
delny->SetInput(pPolyData);
delny->SetTolerance(0.001);
delny->Update();

// Store Delaunay output as PolyData
vtkUnstructuredGrid* usg = vtkUnstructuredGrid::New();
usg = delny->GetOutput();
vtkPolyData* pd = vtkPolyData::New();
pd->SetPoints(usg->GetPoints());
pd->SetPolys(usg->GetCells());

// Get surface triangles with geometry filter
vtkGeometryFilter* geom = vtkGeometryFilter::New();
geom->SetInput(pd);
geom->Update();

// Write the surface triangles to file as PolyData
vtkPolyDataWriter* pWriter = vtkPolyDataWriter::New();
pWriter->SetFileName(szOutfile.c_str());
pWriter->SetInput(geom->GetOutput());
pWriter->Write();

...The PolyData file that comes out this end still has all the 
tetrahedrons intact (and nothing else).  Perhaps there's a mistake here 
that I'm just not seeing...?

Thanks,
Doug


_______________________________________________
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081017/3db5514c/attachment.htm>


More information about the vtkusers mailing list