[vtkusers] The vtkFillHolesFilter doen't work.

Jochen K. jochen.kling at email.de
Tue Jun 26 06:42:59 EDT 2012


Hi Charles,


you may have forgotten to call Update on the FillHolesFilter. This is part
of a common pipeline for filling holes:

//...
vtkSmartPointer<vtkFillHolesFilter> fillHolesFilter =
    vtkSmartPointer<vtkFillHolesFilter>::New();
#if VTK_MAJOR_VERSION <= 5
  fillHolesFilter->SetInputConnection(input->GetProducerPort());
#else
  fillHolesFilter->SetInputData(input);
#endif
 
  fillHolesFilter->Update();
 
  vtkSmartPointer<vtkPolyDataMapper> filledMapper =
    vtkSmartPointer<vtkPolyDataMapper>::New();
  filledMapper->SetInputConnection(fillHolesFilter->GetOutputPort());
 
  vtkSmartPointer<vtkActor> filledActor =
    vtkSmartPointer<vtkActor>::New();
  filledActor->SetMapper(filledMapper);
//...



You also might want to have a look at a full example:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/FillHoles
Wiki/VTK/Examples/Cxx/Meshes/FillHoles 


best regards

Jochen

--
View this message in context: http://vtk.1045678.n5.nabble.com/The-vtkFillHolesFilter-doen-t-work-tp5714226p5714228.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120626/87e88595/attachment.htm>


More information about the vtkusers mailing list