35 #include <vtkFeatureEdges.h> 36 #include <vtkCleanPolyData.h> 37 #include <vtkTriangleFilter.h> 38 #include <vtkStripper.h> 39 #include <vtkSplineFilter.h> 40 #include <vtkConnectivityFilter.h> 41 #include <vtkGeometryFilter.h> 42 #include "Exception.hpp" 43 #include "BoundaryExtractor.hpp" 73 EXCEPTION(
"No output set. Did you run 'Update()' ?");
96 EXCEPTION(
"No input set.");
99 vtkSmartPointer<vtkFeatureEdges> p_features = vtkSmartPointer<vtkFeatureEdges>::New();
100 #if VTK_MAJOR_VERSION <= 5 106 vtkSmartPointer<vtkCleanPolyData> p_clean = vtkSmartPointer<vtkCleanPolyData>::New();
107 p_clean->SetInputConnection(p_features->GetOutputPort());
109 vtkSmartPointer<vtkTriangleFilter> p_triangle = vtkSmartPointer<vtkTriangleFilter>::New();
110 p_triangle->SetInputConnection(p_clean->GetOutputPort());
111 p_triangle->Update();
115 vtkSmartPointer<vtkStripper> p_stripper = vtkSmartPointer<vtkStripper>::New();
116 p_stripper->SetInputConnection(p_triangle->GetOutputPort());
118 vtkSmartPointer<vtkSplineFilter> p_spline = vtkSmartPointer<vtkSplineFilter>::New();
119 p_spline->SetInputConnection(p_stripper->GetOutputPort());
120 p_spline->SetSubdivideToLength();
124 vtkSmartPointer<vtkGeometryFilter> p_geom = vtkSmartPointer<vtkGeometryFilter>::New();
125 p_geom->SetInputConnection(p_spline->GetOutputPort());
128 vtkSmartPointer<vtkTriangleFilter> p_triangle2 = vtkSmartPointer<vtkTriangleFilter>::New();
129 p_triangle2->SetInputConnection(p_geom->GetOutputPort());
130 p_triangle2->Update();
132 vtkSmartPointer<vtkCleanPolyData> p_clean2 = vtkSmartPointer<vtkCleanPolyData>::New();
133 p_clean2->SetInputConnection(p_triangle2->GetOutputPort());