<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: [vtkusers] Delaunay surface triangulation in 3D</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I believe that you want<BR>
<BR>
vtkGeometryFilter* geom = vtkGeometryFilter::New();<BR>
geom->SetInput( delny->GetOutput() );<BR>
geom->Update();<BR>
<BR>
<BR>
Vince<BR>
<BR>
----------------------<BR>
Associate Professor<BR>
Department of Radiology<BR>
0453-D JCP<BR>
200 Hawkins Drive<BR>
Iowa City, IA 52242<BR>
E-mail: vincent-magnotta@uiowa.edu<BR>
Phone: 319-356-8255 Fax: 319-353-6275<BR>
Website: <A HREF="http://www.radiology.uiowa.edu">http://www.radiology.uiowa.edu</A><BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: vtkusers-bounces@vtk.org on behalf of Doug Hackworth<BR>
Sent: Fri 10/17/2008 4:10 PM<BR>
To: vtkusers@vtk.org<BR>
Subject: Re: [vtkusers] Delaunay surface triangulation in 3D<BR>
<BR>
<BR>
> Just run GeometryFilter without "SomeOtherMethod". I thing the default<BR>
> behaviour is wnat you want.<BR>
<BR>
Hmmm. Well, it's not working for me that way, but perhaps I'm missing<BR>
something. Here's my code, from the 3D Delaunay operation on down:<BR>
<BR>
// Do surface triangulation<BR>
vtkDelaunay3D* delny = vtkDelaunay3D::New();<BR>
delny->SetInput(pPolyData);<BR>
delny->SetTolerance(0.001);<BR>
delny->Update();<BR>
<BR>
// Store Delaunay output as PolyData<BR>
vtkUnstructuredGrid* usg = vtkUnstructuredGrid::New();<BR>
usg = delny->GetOutput();<BR>
vtkPolyData* pd = vtkPolyData::New();<BR>
pd->SetPoints(usg->GetPoints());<BR>
pd->SetPolys(usg->GetCells());<BR>
<BR>
// Get surface triangles with geometry filter<BR>
vtkGeometryFilter* geom = vtkGeometryFilter::New();<BR>
geom->SetInput(pd);<BR>
geom->Update();<BR>
<BR>
// Write the surface triangles to file as PolyData<BR>
vtkPolyDataWriter* pWriter = vtkPolyDataWriter::New();<BR>
pWriter->SetFileName(szOutfile.c_str());<BR>
pWriter->SetInput(geom->GetOutput());<BR>
pWriter->Write();<BR>
<BR>
...The PolyData file that comes out this end still has all the<BR>
tetrahedrons intact (and nothing else). Perhaps there's a mistake here<BR>
that I'm just not seeing...?<BR>
<BR>
Thanks,<BR>
Doug<BR>
<BR>
<BR>
_______________________________________________<BR>
This is the private VTK discussion list.<BR>
Please keep messages on-topic. Check the FAQ at: <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
Follow this link to subscribe/unsubscribe:<BR>
<A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>