+//=====
+// 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)
+//=====
+#include "bbcreaVtkLineProfile.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,LineProfile)
+BBTK_BLACK_BOX_IMPLEMENTATION(LineProfile,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+void LineProfile::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+
+printf("EED LineProfile::Process Start\n");
+
+ std::vector<double> profileLst;
+ if ( (bbGetInputPoint1().size()==3) && (bbGetInputPoint2().size()==3) && (bbGetInputIn()!=NULL) )
+ {
+ double x1 = bbGetInputPoint1()[0];
+ double y1 = bbGetInputPoint1()[1];
+ double z1 = bbGetInputPoint1()[2];
+ double x2 = bbGetInputPoint2()[0];
+ double y2 = bbGetInputPoint2()[1];
+ double z2 = bbGetInputPoint2()[2];
+ double dx = x1-x2;
+ double dy = y1-y2;
+ double dz = z1-z2;
+ double dist = (int) sqrt( dx*dx + dy*dy + dz*dz );
+
+printf("EED LineProfile::Process point %f %f %f - %f %f %f\n", x1,y1,z1, x2,y2,z2);
+
+
+ int i;
+ double ii,nx,ny,nz;
+ for (i=0; i<dist;i++)
+ {
+ ii = i/dist;
+ nx = x1 + dx*ii;
+ ny = y1 + dy*ii;
+ nz = z1 + dz*ii;
+ profileLst.push_back( bbGetInputIn()->GetScalarComponentAsDouble(nx,ny,nz,0) );
+printf("%f ", bbGetInputIn()->GetScalarComponentAsDouble(nx,ny,nz,0) );
+ } // for i
+ } // if
+ bbSetOutputOut( profileLst );
+printf("\n");
+printf("EED LineProfile::Process End\n");
+
+}
+//=====
+// 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)
+//=====
+void LineProfile::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn(NULL);
+
+}
+//=====
+// 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)
+//=====
+void LineProfile::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void LineProfile::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+