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 "bbcreaVtkPlaneSource.h"
5 #include "bbcreaVtkPackage.h"
6 #include "vtkPlaneSource.h"
7 #include "vtkDataSet.h"
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,PlaneSource)
13 BBTK_BLACK_BOX_IMPLEMENTATION(PlaneSource,bbtk::AtomicBlackBox);
15 // 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)
17 void PlaneSource::Process()
23 vtkPlaneSource *plane;
24 plane = vtkPlaneSource::New();
25 c[0] = bbGetInputCenter()[0];
26 c[1] = bbGetInputCenter()[1];
27 c[2] = bbGetInputCenter()[2];
37 if ((bbGetInputNormal()[0]==0) && (bbGetInputNormal()[1]==0) && (bbGetInputNormal()[2]==1) )
49 if ((bbGetInputNormal()[0]==0) && (bbGetInputNormal()[1]==1) && (bbGetInputNormal()[2]==0) )
61 if ((bbGetInputNormal()[0]==1) && (bbGetInputNormal()[1]==0) && (bbGetInputNormal()[2]==0) )
72 plane->SetResolution( bbGetInputXResolution(), bbGetInputYResolution() );
75 plane->SetOrigin( p0 );
76 plane->SetPoint1( p1 );
77 plane->SetPoint2( p2 );
79 plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
80 printf("EED PlaneSource. Missing mechanism to define the size of the plane\n");
82 plane->SetCenter( c );
85 bbSetOutputPlane( (vtkDataSet*)plane );
86 bbSetOutputPolyData( plane->GetOutput() );
90 // 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)
92 void PlaneSource::bbUserSetDefaultValues()
94 std::vector<double> c;
95 std::vector<double> n;
104 bbSetInputXResolution(100);
105 bbSetInputYResolution(100);
108 // 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)
110 void PlaneSource::bbUserInitializeProcessing()
116 // 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)
118 void PlaneSource::bbUserFinalizeProcessing()
124 // EO namespace bbcreaVtk