<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'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'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->GetOutput()->ReleaseDataFlagOff();</div>
<div>mcubes->SetInput(VoxelData);</div>
<div>mcubes->SetValue(0, 4);<br>mcubes->ComputeGradientsOn();</div>
<div>mcubes->Update();</div>
<div>vtk::vtkSmoothPolyDataFilter ^smoother = gcnew vtk::vtkSmoothPolyDataFilter();</div>
<div>smoother->GetOutput()->ReleaseDataFlagOff();</div>
<div>smoother->SetInput(mcubes->GetOutput());</div>
<div>smoother->SetNumberOfIterations(5);</div>
<div>smoother->SetRelaxationFactor(0.70);</div>
<div>smoother->SetFeatureAngle(70);</div>
<div>smoother->FeatureEdgeSmoothingOn();<br>smoother->BoundarySmoothingOn();<br> </div>
<div>smoother->Update();</div>
<div>vtk::vtkPolyDataNormals ^normals = gcnew vtk::vtkPolyDataNormals();</div>
<div>normals->GetOutput()->ReleaseDataFlagOff();</div>
<div>normals->SetInput(smoother->GetOutput());</div>
<div>normals->SetFeatureAngle(80);</div>
<div>normals->Update();<br> </div>
<div> vtk::vtkDelaunay3D ^delaunay4 = gcnew vtkDelaunay3D();</div>
<div>try<br>{<br> <br> <br> </div>
<div>delaunay4->SetInputConnection(normals->GetOutputPort());</div>
<div>delaunay4->Update();<br> </div>
<div>}</div>
<div>catch(System::Exception ^ex)<br>{<br> <br> </div>
<div>MessageBox::Show(ex->Message);<br> <br> <br> </div>
<div>}<br> <br> </div>
<div>vtkDataSetMapper ^mapper = gcnew vtk::vtkDataSetMapper();</div>
<div>mapper->SetInputConnection(delaunay4->GetOutputPort());<br> </div>
<div>vtkActor ^actor = gcnew vtk::vtkActor();</div>
<div>actor->SetMapper(mapper);</div>
<div>actor->GetProperty()->SetRepresentationToWireframe();<br> </div>
<div>ren1::AddActor(actor);<br> </div>
<div>renwM::Render();</div>
<div>iren->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>