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();
30 //EED 2017-01-01 Migration VTK7
31 #if VTK_MAJOR_VERSION <= 5
32 clipper->SetInputConnection(inPolyData->GetProducerPort());
34 clipper->SetInputData(inPolyData);
37 clipper->SetClipFunction(plane);
40 vtkPolyData* outPolydata = clipper->GetOutput();
41 bbSetOutputClippedPolyData(outPolydata);
43 // std::cout << "RaC PlaneClipPolyData::Process END "<<polydataCopy<< std::endl;
47 // 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)
49 void PlaneClipPolyData::bbUserSetDefaultValues()
55 // 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)
57 void PlaneClipPolyData::bbUserInitializeProcessing()
63 // 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)
65 void PlaneClipPolyData::bbUserFinalizeProcessing()