<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; I have 
use vtkDelaunay3D class to generate unstructuredgrid data from my point cloud(un 
organized) data. I want&nbsp;<!--StartFragment --> tetrahedra, triangles, edges, 
and vertices data from </FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial 
size=2>vtkDelaunay3D-&gt;GetOutput(). As I use&nbsp; 
vtkDataSet-&gt;GetNumberOfPoints() and </FONT><FONT face=Arial 
size=2>vtkDataSet-&gt;GetNumberOfCells, I always get result&nbsp;0. I 
also&nbsp;implement&nbsp; </FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><STRONG><FONT face=Arial 
size=2>vtkDelaunay3D-&gt;GetOutput()&nbsp;in&nbsp; vtkPolydata form by 
</FONT><FONT face=Arial size=2>vtkExtractUnstructuredGrid - </FONT><FONT 
face=Arial size=2>vtkGeometryFilter - </FONT><FONT face=Arial 
size=2>pPolydatanorm-&gt;GetOutput(), </FONT></STRONG></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2>but get the result 
nothing. I want output data to use display that data in my own way insted use 
<STRONG>vtkPolyDataMapper and render by actor and camera 
class</STRONG>.</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT color=#0000ff><FONT face=Arial size=2>Can 
anyone tell me that how I get&nbsp; tetrahedra, triangles, edges, and vertices 
data information from </FONT><FONT face=Arial 
size=2>vtkDelaunay3D-&gt;GetOutput() as I can use it my own way to display these 
data in OpenGL.</FONT></FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px">&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT color=#0000ff face=Arial size=2>My 
implement is as below.</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px">&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT color=#0000ff face=Arial 
size=2>/////////////////////</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT color=#0000ff>&nbsp;</DIV><FONT 
size=2><FONT face=Arial>
<DIV></FONT><FONT color=#000000>vtkPoints *pvtkPoints = 
vtkPoints::New</FONT></FONT></FONT><FONT face=Arial size=2>();</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff>vtkPoints</FONT><FONT 
color=#000000> *</FONT><FONT color=#808080>pvtkPoints1</FONT><FONT 
color=#000000> = </FONT><FONT color=#0000ff>vtkPoints</FONT><FONT 
color=#000000>::</FONT><FONT color=#880000>New</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#0000ff>CString</FONT><FONT color=#000000> </FONT><FONT 
color=#808080>csFile</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>;</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#0000ff>FILE</FONT><FONT 
color=#000000> *</FONT><FONT color=#808080>fData</FONT><FONT 
color=#000000>=</FONT><FONT color=#880000>fopen</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>("C:\\dataxyz.txt","r");</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#0000ff>FILE</FONT><FONT 
color=#000000> *</FONT><FONT color=#808080>fmathData</FONT><FONT 
color=#000000>=</FONT><FONT color=#880000>fopen</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>("C:\\datamath.txt","w");</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#0000ff>int</FONT><FONT 
color=#000000> </FONT><FONT color=#808080>cnt</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>=0;</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#0000ff>while</FONT><FONT 
color=#000000>(!</FONT><FONT color=#880000>feof</FONT><FONT 
color=#000000>(</FONT><FONT color=#808080>fData</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>))</FONT></DIV>
<DIV><FONT face=Arial size=2>{</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#0000ff>float</FONT><FONT 
color=#000000> </FONT><FONT color=#808080>x</FONT><FONT 
color=#000000>,</FONT><FONT color=#808080>y</FONT><FONT 
color=#000000>,</FONT><FONT color=#808080>z</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>;</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#0000ff>if</FONT><FONT 
color=#000000>(</FONT><FONT color=#880000>fscanf</FONT><FONT 
color=#000000>(</FONT><FONT color=#808080>fData</FONT><FONT color=#000000>,"%f 
%f %f",&amp;</FONT><FONT color=#808080>x</FONT><FONT 
color=#000000>,&amp;</FONT><FONT color=#808080>y</FONT><FONT 
color=#000000>,&amp;</FONT><FONT color=#808080>z</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>)!=3)</FONT></DIV>
<DIV><FONT face=Arial size=2>{</FONT></DIV>
<DIV></FONT><FONT color=#0000ff face=Arial size=2>break</FONT><FONT 
color=#000000><FONT face=Arial size=2>;</FONT></DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>pvtkPoints</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>InsertPoint</FONT><FONT color=#000000>(</FONT><FONT 
color=#808080>cnt</FONT><FONT color=#000000>,</FONT><FONT 
color=#808080>x</FONT><FONT color=#000000>,</FONT><FONT 
color=#808080>y</FONT><FONT color=#000000>,</FONT><FONT 
color=#808080>z</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>);</FONT></FONT></DIV>
<DIV><FONT color=#000000><FONT face=Arial size=2>cnt++;</FONT></DIV></FONT><FONT 
color=#000000>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#880000>fclose</FONT><FONT 
color=#000000>(</FONT><FONT color=#808080>fData</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>);</FONT></DIV></FONT><FONT 
color=#000000></FONT><FONT color=#000000>
<DIV>&nbsp;</DIV><FONT size=2><FONT face=Arial>
<DIV>vtkPolyData* </FONT><FONT color=#808080>pvtkPolyData</FONT><FONT 
color=#000000> = vtkPolyData::</FONT><FONT 
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>pvtkPolyData</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>SetPoints</FONT><FONT color=#000000>(</FONT><FONT 
color=#808080>pvtkPoints</FONT></FONT></FONT><FONT color=#000000><FONT 
face=Arial size=2>);</FONT></DIV></FONT><FONT color=#000000>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>vtkSPDF</FONT><FONT color=#000000> = </FONT><FONT 
color=#0000ff>vtkDelaunay3D</FONT><FONT color=#000000>::</FONT><FONT 
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>vtkSPDF</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>SetInput</FONT><FONT color=#000000>(</FONT><FONT 
color=#808080>pvtkPolyData</FONT></FONT></FONT><FONT color=#000000><FONT 
face=Arial size=2>);</FONT></DIV></FONT><FONT color=#008000>
<DIV style="MARGIN-RIGHT: 0px"></FONT><FONT color=#000000>&nbsp;</DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>vtkSPDF</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>SetAlpha</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>(5);</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>vtkSPDF</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>SetTolerance</FONT></FONT></FONT><FONT color=#000000><FONT 
face=Arial size=2>(1);</FONT></DIV>
<DIV></FONT><FONT face=Arial><FONT size=2><FONT 
color=#808080>vtkSPDF</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>BoundingTriangulationOn</FONT><FONT 
color=#000000></FONT></FONT><FONT face=Arial size=2>();</FONT></DIV></FONT><FONT 
color=#008000>
<DIV><FONT color=#000000 face=Arial 
size=2>vtkSPDF-&gt;SetTolerance(1.0f);</FONT></DIV>
<DIV><FONT color=#000000 face=Arial 
size=2>vtkSPDF-&gt;SetOffset(2.5f);*/</FONT></DIV></FONT><FONT color=#000000>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>dataSet</FONT><FONT color=#000000> = 
vtkUnstructuredGrid::</FONT><FONT color=#880000>New</FONT></FONT></FONT><FONT 
color=#000000><FONT face=Arial size=2>();</FONT></DIV></FONT><FONT 
color=#008000>
<DIV style="MARGIN-RIGHT: 0px"></FONT><FONT color=#000000></FONT><FONT 
color=#008000>&nbsp;</DIV>
<DIV><FONT color=#000000 face=Arial size=2>// OutPut = 
vtkSPDF-&gt;GetOutput();</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"></FONT><FONT color=#000000><FONT face=Arial 
size=2><FONT size=2><FONT face=Arial><FONT color=#808080>vtkPolydata 
*dataSet</FONT><FONT color=#000000> </FONT><FONT color=#808080>= 
vtkPolydata::New();</FONT></FONT></FONT></FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>dataSet</FONT><FONT color=#000000> = </FONT><FONT 
color=#808080>vtkSPDF</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>GetOutput</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>();</FONT></FONT></DIV>
<DIV><FONT color=#000000><FONT face=Arial size=2>
<DIV><FONT color=#0000ff><FONT face=Arial size=2><STRONG><FONT size=2><FONT 
face=Arial>dataSet </FONT></FONT>-&gt;GetNumberOfCells(); -------------The 
result is nothing as always 
0.</STRONG></FONT></FONT></DIV></FONT></DIV></FONT><FONT color=#008000>
<DIV style="MARGIN-RIGHT: 0px"></FONT><FONT 
color=#000000>&nbsp;</DIV></FONT><FONT color=#000000><FONT size=2><FONT 
face=Arial>
<DIV>vtkExtractUnstructuredGrid *</FONT><FONT color=#808080>pEXGrid</FONT><FONT 
color=#000000> = vtkExtractUnstructuredGrid::</FONT><FONT 
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>pEXGrid</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>SetInput</FONT><FONT color=#000000>(</FONT><FONT 
color=#808080>dataSet</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>);</FONT></DIV>
<DIV></FONT><FONT color=#808080 face=Arial size=2>pEXGrid</FONT><FONT 
color=#000000><FONT face=Arial size=2>-&gt;CellClippingOff();</FONT></DIV>
<DIV></FONT><FONT color=#808080 face=Arial size=2>pEXGrid</FONT><FONT 
color=#000000><FONT face=Arial size=2>-&gt;SetCellMinimum(0);</FONT></DIV>
<DIV></FONT><FONT color=#808080 face=Arial size=2>pEXGrid</FONT><FONT 
color=#000000><FONT face=Arial size=2>-&gt;SetCellMaximum(23);</FONT></DIV><FONT 
size=2><FONT face=Arial>
<DIV>vtkGeometryFilter *</FONT><FONT color=#808080>pGeo</FONT><FONT 
color=#000000> = vtkGeometryFilter::</FONT><FONT 
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#808080>pGeo</FONT><FONT 
color=#000000>-&gt;</FONT><FONT color=#880000>SetInput</FONT><FONT 
color=#000000>(</FONT><FONT color=#808080>pEXGrid</FONT><FONT 
color=#000000>-&gt;</FONT><FONT 
color=#880000>GetOutput</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>());</FONT></DIV>
<DIV></FONT><FONT color=#808080 face=Arial size=2>pGeo</FONT><FONT 
color=#000000><FONT face=Arial size=2>-&gt;MergingOn(); </FONT></DIV><FONT 
size=2><FONT face=Arial>
<DIV>vtkPolyDataNormals *</FONT><FONT color=#808080>pPolydatanorm</FONT><FONT 
color=#000000> = vtkPolyDataNormals::</FONT><FONT 
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT 
color=#808080>pPolydatanorm</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>SetInput</FONT><FONT color=#000000>(</FONT><FONT 
color=#808080>pGeo</FONT><FONT color=#000000>-&gt;</FONT><FONT 
color=#880000>GetOutput</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial 
size=2>());</FONT></DIV>
<DIV></FONT><FONT color=#808080 face=Arial size=2>pPolydatanorm</FONT><FONT 
color=#000000><FONT face=Arial size=2>-&gt;SetFeatureAngle(60);</FONT></DIV>
<DIV></FONT><FONT color=#808080 face=Arial size=2>pPolydatanorm</FONT><FONT 
color=#000000><FONT face=Arial 
size=2>-&gt;ComputeCellNormalsOn();</FONT></FONT></DIV>
<DIV><FONT color=#000000><FONT face=Arial size=2><FONT color=#808080 face=Arial 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkPolydata *p=<FONT face=Arial size=2>vtkPolydata 
::New;</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>p = <FONT color=#000000><FONT face=Arial 
size=2><FONT color=#808080 face=Arial 
size=2>pPolydatanorm-&gt;GetOutput();</FONT></FONT></FONT></FONT></DIV>
<DIV><FONT color=#0000ff><FONT face=Arial size=2><STRONG><FONT face=Arial 
size=2>p</FONT><FONT face=Arial size=2>-&gt;GetNumberOfCells(); 
-----------------The result is 0 always.</FONT></STRONG></FONT></FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px">&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px">&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT color=#0000ff face=Arial 
size=2>/////////////////////</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px">&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2>Thanks in 
adv.</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2>Amit Dhaduk</FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial size=2>SSPL.</FONT></DIV><PRE style="MARGIN-RIGHT: 0px">&nbsp;</PRE></BODY></HTML>