<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi,<br>
<br>
I use this code for it.<br>
(the extract surface/smooth part is optional)<br>
<br>
</p>
<div>// clean the polydata<br>
vtkSmartPointer<vtkCleanPolyData> cleanPolyData =<br>
vtkSmartPointer<vtkCleanPolyData>::New();<br>
cleanPolyData->SetInputConnection(INPUT->GetOutputPort());<br>
cleanPolyData->Update();<br>
// use delaunay3D<br>
vtkSmartPointer<vtkDelaunay3D> delaunay3DAlpha =<br>
vtkSmartPointer<vtkDelaunay3D>::New();<br>
delaunay3DAlpha->SetInputData(cleanPolyData->GetOutput());<br>
//delaunay3DAlpha->SetTolerance(0.0001);<br>
<span>//</span>delaunay3DAlpha->SetAlpha(20); <br>
<span>//</span>delaunay3DAlpha->SetAlphaLines(0);<br>
<span>//</span>delaunay3DAlpha->SetAlphaTris(0);<br>
<span>//</span> delaunay3DAlpha->SetAlphaTets(1);<br>
<span>//</span>delaunay3DAlpha->SetAlphaVerts(0);<br>
<span>//</span>delaunay3DAlpha->SetBoundingTriangulation(0); <br>
delaunay3DAlpha->Update();<br>
// extract surface<br>
vtkGeometryFilter* geom = vtkGeometryFilter::New();<br>
geom->SetInputData(delaunay3DAlpha->GetOutput());<br>
geom->Update();<br>
// smooth<br>
vtkSmoothPolyDataFilter* smooth22 = vtkSmoothPolyDataFilter::New();<br>
smooth22->SetInputConnection(geom->GetOutputPort());<br>
smooth22->SetNumberOfIterations(15);<br>
smooth22->SetRelaxationFactor(0.3);<br>
smooth22->Update();<br>
// write output file<br>
vtkSmartPointer<vtkPolyDataWriter> writer =<br>
vtkSmartPointer<vtkPolyDataWriter>::New();<br>
writer->SetInputData(smooth22->GetOutput());<br>
writer->SetFileName(PATH + FILENAME.vtk);<br>
writer->Write(); </div>
<br>
<p></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Von:</b> vtkusers <vtkusers-bounces@vtk.org> im Auftrag von Kailu Shan <kailushan@163.com><br>
<b>Gesendet:</b> Dienstag, 17. Jänner 2017 10:05<br>
<b>An:</b> VTK Users<br>
<b>Betreff:</b> [vtkusers] How to write vtkDelaunay3D into .vtk file</font>
<div> </div>
</div>
<div>
<div style="line-height:1.7; color:#000000; font-size:14px; font-family:Arial">
<div>How to write the vtkDelaunay3D data into .vtk file?</div>
<div>Thanks!</div>
</div>
</div>
</div>
</div>
</body>
</html>