<div dir="ltr">at the following code the program always crash when the deluanry fillter try to get the input <div><br></div><div><font class="Apple-style-span" face="verdana, geneva, helvetica, arial, sans-serif"><span class="Apple-style-span" style="white-space: pre;">I start by got the voxeldata that contain the 3D reconstructions of the 2d slices :</span></font></div>
<div><font class="Apple-style-span" face="verdana, geneva, helvetica, arial, sans-serif"><span class="Apple-style-span" style="white-space: pre;"><br></span></font></div><div><font class="Apple-style-span" face="verdana, geneva, helvetica, arial, sans-serif"><span class="Apple-style-span" style="white-space: pre;"><div>
ren1 = new vtk.vtkRenderer();</div><div> renwM = r;</div><div> renwM.AddRenderer(ren1);</div><div> iren.SetRenderWindow(renwM);</div><div><br></div><div> </div><div> vtk.vtkMarchingCubes mcubes =new vtk.vtkMarchingCubes();</div>
<div> mcubes.GetOutput().ReleaseDataFlagOff();</div><div> mcubes.SetInput(VoxelData);</div><div> mcubes.SetValue(0, 4);</div><div> mcubes.ComputeGradientsOn();</div><div> mcubes.Update();</div>
<div> MessageBox.Show(mcubes.GetOutput().GetActualMemorySize().ToString() + "**********************" + mcubes.GetOutput().GetNumberOfCells().ToString() + "**********************" + mcubes.GetOutput().GetNumberOfPoints().ToString());</div>
<div><br></div><div> vtk.vtkSmoothPolyDataFilter smoother =new 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();</div><div> smoother.BoundarySmoothingOn();</div>
<div> smoother.Update();</div><div> MessageBox.Show(smoother.GetOutput().GetActualMemorySize().ToString() + "**********************" + smoother.GetOutput().GetNumberOfCells().ToString() + "**********************" + smoother.GetOutput().GetNumberOfPoints().ToString());</div>
<div> vtk.vtkPolyDataNormals normals =new vtk.vtkPolyDataNormals();</div><div> normals.GetOutput().ReleaseDataFlagOff();</div><div> normals.SetInput(smoother.GetOutput());</div><div> normals.SetFeatureAngle(80);</div>
<div> normals.Update();</div><div> </div><div> vtk.vtkDelaunay3D delaunay4 = new vtkDelaunay3D();</div><div> try { </div><div> </div><div> </div><div> delaunay4.SetInputConnection(normals.GetOutputPort());</div>
<div> delaunay4.Update();</div><div> </div><div> }</div><div> catch(System.Exception ex)</div><div> {</div><div> </div><div> MessageBox.Show(ex.Message);</div><div>
</div><div> </div><div> }</div><div><br></div><div><br></div><div> vtkDataSetMapper mapper = new vtk.vtkDataSetMapper();</div><div> mapper.SetInputConnection(delaunay4.GetOutputPort());</div>
<div> vtkActor actor = new vtk.vtkActor();</div><div> actor.SetMapper(mapper);</div><div> actor.GetProperty().SetRepresentationToWireframe();</div><div><br></div><div> ren1.AddActor(actor);</div>
<div> renwM.Render();</div><div> iren.Initialize(); iren.Enable();</div><div><br></div><div><br></div><div>-----------------------------------------------------------------------------------</div><div>
I used getactualmemorysize and numberofcells and numberof point:</div><div><br></div><div>at marching, till normal steps I have 23799 kb , 6608388 cells , and 3306508 points ,a ny suggestions please </div></span></font></div>
</div>