[vtkusers] vtkThreshold: how to change the parameter to colour instead of remove the areas
polly_sukting at hotmail.com
Thu Dec 28 12:21:16 EST 2017
Hi. I am using vtkThreshold to extract the areas on vtk 3D face data.
However, it removed the important areas (areas that i am looking at) and
left with holes.
My question is how can I change the parameter on this ThresholdByLower?
I would like to replace the deleted areas which meet the criterion with
different colour instead of just remove them and leave them with holes. I have been looking
over the library and found vtkThreshold.cxx regarding the parameter of this.
However, I am not able to change the 'delete' to 'SetColor'.
// now clean up / update ourselves
Much appreciate if someone can help on this.
Image is attached:
This is my code:
vtkPolyDataReader *reader = vtkPolyDataReader::New();
vtkCurvatures *meanCurve = vtkCurvatures::New();
vtkThreshold *thresh = vtkThreshold::New();
vtkGeometryFilter *geom = vtkGeometryFilter::New();
vtkPolyDataMapper *mapper2 = vtkPolyDataMapper::New();
vtkActor *actor2 = vtkActor::New();
actor2->GetProperty()->SetColor(0.0, 0.0, 0.0);
vtkRenderer *renderer = vtkRenderer::New();
renderer->SetBackground(.1, .2, .3); // Background color blue
// Render and interact
vtkRenderWindow *renderWindow = vtkRenderWindow::New();
vtkRenderWindowInteractor *renderWindowInteractor =
Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers