[vtkusers] VTK with OpenMP support and processing progress of filters?

Ashika Umanga Umagiliya aumanga at biggjapan.com
Mon Feb 7 20:22:09 EST 2011


Greetings all,

I`ve got two questions.
1) Is it possible to compile VTK with OpenMP support ? (Does any of
the filters/algorithms implemented with OpenMP support ? )

2) I have a filter chain as follows.I run this in a QT application.I
want to get the progress of each filter.I know there is a method
called GetProgress() , but is there anything like an "EventHandler"
which triggers when the progress updated?

Thanks in advance.



vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
	
vtkSmartPointer<vtkPolyDataMapper> mapper =
vtkSmartPointer<vtkPolyDataMapper>::New();

vtkSmartPointer<vtkVoxelContoursToSurfaceFilter> contoursToSurface
=vtkSmartPointer<vtkVoxelContoursToSurfaceFilter>::New();

  contoursToSurface->SetInputConnection(appPoly->GetOutputPort());
  contoursToSurface->SetSpacing(1, 1, 1);
  contoursToSurface->GetOutput()->GetBounds(bm);


vtkSmartPointer<vtkTriangleFilter> trianFilter =
vtkSmartPointer<vtkTriangleFilter>::New();
  trianFilter->SetInputConnection(contoursToSurface->GetOutputPort());


vtkSmartPointer<vtkQuadricDecimation> quadDec =
vtkSmartPointer<vtkQuadricDecimation>::New();
  quadDec->SetTargetReduction(0.5);
  quadDec->SetInputConnection(trianFilter->GetOutputPort());


vtkSmartPointer<vtkSmoothPolyDataFilter> smooth =
vtkSmartPointer<vtkSmoothPolyDataFilter>::New();
  smooth->SetInputConnection(quadDec->GetOutputPort());
  smooth->SetNumberOfIterations(smoothInter);
  smooth->SetRelaxationFactor(smoothFac);
  smooth->Update();

mapper->AddInputConnection(smooth->GetOutputPort());



More information about the vtkusers mailing list