[vtkusers] Slow vtkPolyDataToImageStencil
    Marius Erdt 
    marius.erdt at gmx.de
       
    Thu May 15 04:30:04 EDT 2008
    
    
  
Hi,
I'm using the vtkPolyDataToImageStencil Filter to convert a polyData 
mesh into vtkImageStencilData which I want to use to mask an area in 
another volume.
However, the filter takes a large amount of time to run (> 25 minutes on 
a Quad 6600 2,4 GHz). The mesh itself is the result of VTK marching 
cubes and is not very complex (one konvex object).
Below is the code fragment I took from this list for the conversion.
Thanks for any help,
Marius
        vtkPolyDataNormals * normalsFilter = vtkPolyDataNormals::New();
        normalsFilter->SetInput( polyData );
        normalsFilter->SetFeatureAngle(50);
        normalsFilter->SetConsistency(1);
        normalsFilter->SetSplitting(1);
        normalsFilter->SetFlipNormals(0);
        normalsFilter->Update();
        vtkPolyDataToImageStencil * surfaceConverter = 
vtkPolyDataToImageStencil::New();
        surfaceConverter->SetInput( normalsFilter->GetOutput() );
        surfaceConverter->SetTolerance( 0.0 );
        surfaceConverter->Update();
    
    
More information about the vtkusers
mailing list