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 "bbcreaVtkLineProfile.h"
5 #include "bbcreaVtkPackage.h"
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,LineProfile)
12 BBTK_BLACK_BOX_IMPLEMENTATION(LineProfile,bbtk::AtomicBlackBox);
14 // 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)
16 void LineProfile::Process()
19 // THE MAIN PROCESSING METHOD BODY
20 // Here we simply set the input 'In' value to the output 'Out'
21 // And print out the output value
22 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
23 // void bbSet{Input|Output}NAME(const TYPE&)
24 // const TYPE& bbGet{Input|Output}NAME() const
26 // * NAME is the name of the input/output
27 // (the one provided in the attribute 'name' of the tag 'input')
28 // * TYPE is the C++ type of the input/output
29 // (the one provided in the attribute 'type' of the tag 'input')
32 printf("EED LineProfile::Process Start\n");
34 std::vector<double> profileLst;
35 if ( (bbGetInputPoint1().size()==3) && (bbGetInputPoint2().size()==3) && (bbGetInputIn()!=NULL) )
37 double x1 = bbGetInputPoint1()[0];
38 double y1 = bbGetInputPoint1()[1];
39 double z1 = bbGetInputPoint1()[2];
40 double x2 = bbGetInputPoint2()[0];
41 double y2 = bbGetInputPoint2()[1];
42 double z2 = bbGetInputPoint2()[2];
46 double dist = (int) sqrt( dx*dx + dy*dy + dz*dz );
48 printf("EED LineProfile::Process point %f %f %f - %f %f %f\n", x1,y1,z1, x2,y2,z2);
59 profileLst.push_back( bbGetInputIn()->GetScalarComponentAsDouble(nx,ny,nz,0) );
60 printf("%f ", bbGetInputIn()->GetScalarComponentAsDouble(nx,ny,nz,0) );
63 bbSetOutputOut( profileLst );
65 printf("EED LineProfile::Process End\n");
69 // 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)
71 void LineProfile::bbUserSetDefaultValues()
74 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
75 // Here we initialize the input 'In' to 0
80 // 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)
82 void LineProfile::bbUserInitializeProcessing()
85 // THE INITIALIZATION METHOD BODY :
87 // but this is where you should allocate the internal/output pointers
93 // 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)
95 void LineProfile::bbUserFinalizeProcessing()
98 // THE FINALIZATION METHOD BODY :
100 // but this is where you should desallocate the internal/output pointers
105 // EO namespace bbcreaVtk