<div>Hi, VTK guys,<br><br>I use VTK 7.0 to generate 3D model from DICOM series. I just follow the code example from <br><pre><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/MarchingCubes%22.">http://www.vtk.org/pipermail/vtkusers/2013-November/082109.html</a>. When I try to reduce the number of triangles by vtkDecimatePro, the Visual Studio 2015 monitor shows that the memory jump to over 10G and my computer has no response, I have to restart my computer rudely. See my code below, with my DICOM series, the marched->GetNumberOfPoints() return more than 20 millions:<br><br> vtkSmartPointer<vtkMarchingCubes> surface = vtkSmartPointer<vtkMarchingCubes>::New();
surface->SetInputData(volume);
surface->ComputeNormalsOn();
surface->ComputeScalarsOn();
surface->SetValue(0, 1);
// Create polydata from iso-surface
vtkSmartPointer<vtkPolyData> marched = vtkSmartPointer<vtkPolyData>::New();
surface->Update();
marched->DeepCopy(surface->GetOutput());
std::cout<<"Number of points: " << marched->GetNumberOfPoints() << std::endl;
// Decimation to reduce the number of triangles
vtkSmartPointer<vtkDecimatePro> decimator = vtkDecimatePro::New();
decimator->SetInputData(marched);
decimator->SetTargetReduction(0.5);
decimator->SetPreserveTopology(1);
decimator->Update(); <------------------memory cost jumps to more than 10G.<br><br>Any suggestions to decrease the memory cost? I only know that using vtkImageThreshold.<br>Thanks,<br>Liu Peng<br></pre></div><br><br><span title="neteasefooter"><p> </p></span>