[vtkusers] vtkDecimatePro   Problem
    葛为卫 
    210513028 at suda.edu.cn
       
    Thu Jul 27 10:19:14 EDT 2006
    
    
  
hello,everyone.
I have a problem.I appreciate someone can help me.
Here is my source code.It's very simple,read CT images and rebuild then in 3D.
You can see that I use vtkDecimatePro to decimate triangle plane.But after 
that job.I find that it costs more time.
I'm very puzzled.I take the method to speed up,but it costs more time.Can some
tell me why.
Thank everyone in advance.  Best regards.
...
...
  vtkDICOMImageReader   *reader =  vtkDICOMImageReader::New();
	reader->SetDataByteOrderToLittleEndian();
	reader->SetDirectoryName("C://data");
	reader->SetDataSpacing(3.2, 3.2, 1.5);
	reader->SetDataOrigin(0.0, 0.0, 0.0);
  vtkContourFilter *skinExtractor = vtkContourFilter::New();
    skinExtractor->SetInputConnection(reader->GetOutputPort());
    skinExtractor->SetValue(0,1500);
  vtkDecimatePro *decimatepro=vtkDecimatePro::New();
	decimatepro->SetInputConnection(skinExtractor->GetOutputPort());
	decimatepro->SetTargetReduction(0.8);
  vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();
    skinNormals->SetInputConnection(skinExtractor->GetOutputPort());
    skinNormals->SetFeatureAngle(180);
.....
.....
    
    
More information about the vtkusers
mailing list