<div dir="ltr"><div>Hi All,</div>
<div> </div>
<div>this is my fourth time to send to your group asking the help , I amn&#39;t sure if my questions be sent or not but this is my question again:</div>
<div> </div>
<div>I created a 3D volumeof skull from 2D slices I want to create a Mesh on this 3D I tried alot of things and I found in an old question an algorithm but when applying it always give bug and error said that VTKinttype array can&#39;t load elements :I used getactualmemorysize and numberofcells and numberof point:at marching, till normal steps I have 23799 kb , 6608388 cells , and 3306508 points ,I commented the delaunary part and return the same error :</div>

<div> </div>
<div>the code is :</div>
<div> </div>
<div> ren1 = gcnew vtk::vtkRenderer();<br>renwM = r;</div>
<div>renwM::AddRenderer(ren1);</div>
<div>iren::SetRenderWindow(renwM);<br> <br> <br> </div>
<div>  vtk::vtkMarchingCubes ^mcubes = gcnew vtk::vtkMarchingCubes();</div>
<div>mcubes-&gt;GetOutput()-&gt;ReleaseDataFlagOff();</div>
<div>mcubes-&gt;SetInput(VoxelData);</div>
<div>mcubes-&gt;SetValue(0, 4);<br>mcubes-&gt;ComputeGradientsOn();</div>
<div>mcubes-&gt;Update();</div>
<div>vtk::vtkSmoothPolyDataFilter ^smoother = gcnew vtk::vtkSmoothPolyDataFilter();</div>
<div>smoother-&gt;GetOutput()-&gt;ReleaseDataFlagOff();</div>
<div>smoother-&gt;SetInput(mcubes-&gt;GetOutput());</div>
<div>smoother-&gt;SetNumberOfIterations(5);</div>
<div>smoother-&gt;SetRelaxationFactor(0.70);</div>
<div>smoother-&gt;SetFeatureAngle(70);</div>
<div>smoother-&gt;FeatureEdgeSmoothingOn();<br>smoother-&gt;BoundarySmoothingOn();<br> </div>
<div>smoother-&gt;Update();</div>
<div>vtk::vtkPolyDataNormals ^normals = gcnew vtk::vtkPolyDataNormals();</div>
<div>normals-&gt;GetOutput()-&gt;ReleaseDataFlagOff();</div>
<div>normals-&gt;SetInput(smoother-&gt;GetOutput());</div>
<div>normals-&gt;SetFeatureAngle(80);</div>
<div>normals-&gt;Update();<br> </div>
<div>  vtk::vtkDelaunay3D ^delaunay4 = gcnew vtkDelaunay3D();</div>
<div>try<br>{<br> <br> <br> </div>
<div>delaunay4-&gt;SetInputConnection(normals-&gt;GetOutputPort());</div>
<div>delaunay4-&gt;Update();<br> </div>
<div>}</div>
<div>catch(System::Exception ^ex)<br>{<br> <br> </div>
<div>MessageBox::Show(ex-&gt;Message);<br> <br> <br> </div>
<div>}<br> <br> </div>
<div>vtkDataSetMapper ^mapper = gcnew vtk::vtkDataSetMapper();</div>
<div>mapper-&gt;SetInputConnection(delaunay4-&gt;GetOutputPort());<br> </div>
<div>vtkActor ^actor = gcnew vtk::vtkActor();</div>
<div>actor-&gt;SetMapper(mapper);</div>
<div>actor-&gt;GetProperty()-&gt;SetRepresentationToWireframe();<br> </div>
<div>ren1::AddActor(actor);<br> </div>
<div>renwM::Render();</div>
<div>iren-&gt;Initialize();<br>iren::Enable();</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>Looking forward to your help </div>
<div> </div>
<div>Best regards </div>
<div> </div>
<div> </div>
<div> </div></div>