[vtkusers] vtkDelaunry3D can't load 6608388 element how to fix that

Ali Habib ali.mahmoud.habib at gmail.com
Mon Oct 12 14:10:10 EDT 2009


at the following code the program always crash when the deluanry fillter try
to get the input
I start by got the voxeldata that contain the 3D reconstructions of the 2d
slices :

 ren1 = new vtk.vtkRenderer();
            renwM = r;
            renwM.AddRenderer(ren1);
            iren.SetRenderWindow(renwM);


       vtk.vtkMarchingCubes mcubes =new vtk.vtkMarchingCubes();
        mcubes.GetOutput().ReleaseDataFlagOff();
        mcubes.SetInput(VoxelData);
        mcubes.SetValue(0, 4);
        mcubes.ComputeGradientsOn();
        mcubes.Update();
        MessageBox.Show(mcubes.GetOutput().GetActualMemorySize().ToString()
+ "**********************" +
mcubes.GetOutput().GetNumberOfCells().ToString() + "**********************"
+ mcubes.GetOutput().GetNumberOfPoints().ToString());

        vtk.vtkSmoothPolyDataFilter smoother =new
vtk.vtkSmoothPolyDataFilter();
        smoother.GetOutput().ReleaseDataFlagOff();
        smoother.SetInput(mcubes.GetOutput());
        smoother.SetNumberOfIterations(5);
        smoother.SetRelaxationFactor(0.70);
        smoother.SetFeatureAngle(70);
        smoother.FeatureEdgeSmoothingOn();
        smoother.BoundarySmoothingOn();
        smoother.Update();

 MessageBox.Show(smoother.GetOutput().GetActualMemorySize().ToString() +
"**********************" +
smoother.GetOutput().GetNumberOfCells().ToString() +
"**********************" +
smoother.GetOutput().GetNumberOfPoints().ToString());
        vtk.vtkPolyDataNormals normals =new vtk.vtkPolyDataNormals();
        normals.GetOutput().ReleaseDataFlagOff();
        normals.SetInput(smoother.GetOutput());
        normals.SetFeatureAngle(80);
        normals.Update();

vtk.vtkDelaunay3D  delaunay4 = new vtkDelaunay3D();
        try {


        delaunay4.SetInputConnection(normals.GetOutputPort());
        delaunay4.Update();

        }
            catch(System.Exception ex)
        {

            MessageBox.Show(ex.Message);


            }


        vtkDataSetMapper mapper = new vtk.vtkDataSetMapper();
            mapper.SetInputConnection(delaunay4.GetOutputPort());
            vtkActor actor = new vtk.vtkActor();
            actor.SetMapper(mapper);
            actor.GetProperty().SetRepresentationToWireframe();

            ren1.AddActor(actor);
            renwM.Render();
            iren.Initialize(); iren.Enable();


-----------------------------------------------------------------------------------
I used getactualmemorysize and numberofcells and numberof point:

at marching, till normal steps I have 23799 kb , 6608388 cells , and 3306508
points ,a ny suggestions please
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091012/74ab2812/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xx.jpg
Type: image/jpeg
Size: 29029 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091012/74ab2812/attachment.jpg>


More information about the vtkusers mailing list