<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>Hi,</DIV>
<DIV id="isForwardContent">
<DIV style="LINE-HEIGHT: 1.7; FONT-FAMILY: arial; COLOR: #000000; FONT-SIZE: 14px">
<DIV>We try to creates a tetrahedral mesh from unorganized points with vtkDelaunay3D filter. If the number of points is </DIV>
<DIV>very small(64*64*2), the filter work well. But error displays when the number is larger(256*256*2). The following is our code:</DIV>
<DIV> </DIV>
<DIV>int dims[3];</DIV>
<DIV> dims[0]=256;<BR> dims[1]=256;<BR> dims[2]=2;</DIV>
<DIV> </DIV>
<DIV>//instance vtkPoints </DIV>
<DIV> vtkPoints * points = vtkPoints::New();</DIV>
<DIV>for(int k=0;k<dims[2];k++)<BR>  for(int j=0;j<dims[1];j++)<BR>    for(int i=0;i<dims[0];i++)<BR>      {<BR>         points->InsertPoint(k*dims[1]*dims[0]+j*dims[0]+i,(double)i*0.95,(double)j*0.95,(double)k*1.5);<BR>      }</DIV>
<DIV> </DIV>
<DIV>//instance vtkPolyVertex </DIV>
<DIV>vtkPolyVertex * polyvertex = vtkPolyVertex::New();<BR> polyvertex->GetPointIds()->SetNumberOfIds(dims[0]*dims[1]*dims[2]);<BR> for(int i=0;i<dims[0]*dims[1]*dims[2];i++)</DIV>
<DIV> {<BR>  polyvertex->GetPointIds()->SetId(i,i);<BR> }</DIV>
<DIV> </DIV>
<DIV>//instance vtkUnstructuredGrid</DIV>
<DIV> vtkUnstructuredGrid * grid=vtkUnstructuredGrid::New();<BR> grid->SetPoints(points);<BR> grid->InsertNextCell(polyvertex->GetCellType(), polyvertex->GetPointIds());</DIV>
<DIV> </DIV>
<DIV>//Set scalars for grid</DIV>
<DIV>vtkUnsignedCharArray *dataArray=vtkUnsignedCharArray::New();<BR> for(int i=0;i<dims[0]*dims[1]*dims[2];i++)<BR> {<BR>   dataArray->InsertNextTuple1(i%128+128);<BR> }<BR> vtkPointData* pointdata=grid->GetPointData();<BR> pointdata->SetScalars(dataArray);</DIV>
<DIV> </DIV>
<DIV>//vtkDelaunay3D filter</DIV>
<DIV>vtkSmartPointer<vtkDelaunay3D> delaunay3D=vtkSmartPointer<vtkDelaunay3D>::New();<BR>   delaunay3D->SetInput(grid);<BR>   delaunay3D->SetTolerance(0.001);<BR>   delaunay3D->SetAlpha(100);<BR>   vtkUnstructuredGrid *delnoutput=delaunay3D->GetOutput();<BR> delnoutput->Update();</DIV>
<DIV> </DIV>
<DIV>The error is:</DIV>
<DIV><SPAN name="subject">"The instruction at 0x00581eed referenced memory at 0x17879000. The memory could not be read. "</SPAN></DIV>
<DIV><SPAN name="subject"></SPAN> </DIV>
<DIV><SPAN name="subject">The version of VTK is 5.10.0, which is compiled from source, our systerm is Windows XP (SP3).</SPAN></DIV>
<DIV><SPAN name="subject"></SPAN> </DIV>
<DIV><SPAN name="subject">How can we solve this problem, and how much number of points can vtkDelaunay3D do?</SPAN></DIV>
<DIV><SPAN name="subject">Thakns!</SPAN></DIV>
<DIV><SPAN name="subject">XiongXiang Zhang</SPAN></DIV></DIV><BR><BR><SPAN title="neteasefooter"><SPAN id="netease_mail_footer"></SPAN></SPAN></DIV></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>