2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
4 #include "bbvtkPlaneClipPolyData.h"
5 #include "bbvtkPackage.h"
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,PlaneClipPolyData)
10 BBTK_BLACK_BOX_IMPLEMENTATION(PlaneClipPolyData,bbtk::AtomicBlackBox);
12 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
14 void PlaneClipPolyData::Process()
17 //std::cout << "RaC PlaneClipPolyData::Process START"<< std::endl;
19 std::vector<double> origin = bbGetInputPlaneOrigin();
20 std::vector<double> normal = bbGetInputPlaneNormal();
22 vtkPolyData* inPolyData = bbGetInputPolyData();
24 vtkPlane* plane = vtkPlane::New();
25 plane->SetOrigin(origin[0],origin[1],origin[2]);
26 plane->SetNormal(normal[0],normal[1],normal[2]);
28 vtkClipPolyData* clipper = vtkClipPolyData::New();
29 clipper->SetInputConnection(inPolyData->GetProducerPort());
30 clipper->SetClipFunction(plane);
33 vtkPolyData* outPolydata = clipper->GetOutput();
34 bbSetOutputClippedPolyData(outPolydata);
36 // std::cout << "RaC PlaneClipPolyData::Process END "<<polydataCopy<< std::endl;
40 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
42 void PlaneClipPolyData::bbUserSetDefaultValues()
48 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
50 void PlaneClipPolyData::bbUserInitializeProcessing()
56 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
58 void PlaneClipPolyData::bbUserFinalizeProcessing()