#ifdef USE_WT
+
#ifndef __bbtkWtBlackBox_h__
#define __bbtkWtBlackBox_h__
if (bbGetInputType()==3)
{
- if (bbGetInputIn2()!=0) bbSetOutputOut( bbGetInputIn1() / bbGetInputIn2() );
+ if (bbGetInputIn2()!=0) bbSetOutputOut( bbGetInputIn1() / bbGetInputIn2() );
else bbSetOutputOut( 99999999 );
}
if (bbGetInputType()==5)
{
- if (bbGetInputIn2()>0) bbSetOutputOut( log( bbGetInputIn1() ) );
+ if (bbGetInputIn1()>0) bbSetOutputOut( log( bbGetInputIn1() ) );
else bbSetOutputOut( -99999999 );
}
acum++;
if (acum>bbGetInputIn2()) acum=bbGetInputIn1();
}
- if (bbGetInputType()==8) bbSetOutputOut( rand() % (int) (bbGetInputIn2()-bbGetInputIn1()) + bbGetInputIn1() );
- if (bbGetInputType()==9) bbSetOutputOut( sin( bbGetInputIn1() ) );
+ if (bbGetInputType()==8 ) bbSetOutputOut( rand() % (int) (bbGetInputIn2()-bbGetInputIn1()) + bbGetInputIn1() );
+ if (bbGetInputType()==9 ) bbSetOutputOut( sin( bbGetInputIn1() ) );
if (bbGetInputType()==10) bbSetOutputOut( cos( bbGetInputIn1() ) );
if (bbGetInputType()==11) bbSetOutputOut( tan( bbGetInputIn1() ) );
if (bbGetInputType()==12) bbSetOutputOut( asin( bbGetInputIn1() ) );
if (bbGetInputType()==13) bbSetOutputOut( acos( bbGetInputIn1() ) );
if (bbGetInputType()==14) bbSetOutputOut( atan( bbGetInputIn1() ) );
if (bbGetInputType()==15) bbSetOutputOut( atan2( bbGetInputIn1(),bbGetInputIn2() ) );
+ if (bbGetInputType()==16) bbSetOutputOut( fmin( bbGetInputIn1(),bbGetInputIn2() ) );
+ if (bbGetInputType()==17) bbSetOutputOut( fmax( bbGetInputIn1(),bbGetInputIn2() ) );
+ if (bbGetInputType()==18) bbSetOutputOut( fabs( bbGetInputIn1() ) );
}
//=====
// 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)
firsttime=true;
acum=0;
}
+
//=====
// 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)
//=====
// 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 MathOperation::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
-// if any
-
-}
+// if any
}
-// EO namespace bbstd
+
+}// EO namespace bbstd
BBTK_BEGIN_DESCRIBE_BLACK_BOX(MathOperation,bbtk::AtomicBlackBox);
BBTK_NAME("MathOperation");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("Out = In1 <operation> In2");
BBTK_CATEGORY("empty");
BBTK_INPUT(MathOperation,In1,"First input",double,"");
BBTK_INPUT(MathOperation,In2,"Second input",double,"");
- BBTK_INPUT(MathOperation,Type,"Type (defalult 0): 0 adition (default), 1 sustraction In1+In2, 2 multiplication In1*In2, 3 divisiuon In1/In2, 4 sqrt In1, 5 log In1, 6 exp In1, 7 incremental int [In1..In2], 8 random int [In1..In2], 9 sin In1, 10 cos In1, 11 tan In1, 12 asin In 1, 13 acos In1, 14 atan In1, 15 atan2 In1,In2 ",int,"");
+ BBTK_INPUT(MathOperation,Type,"Type (defalult 0): 0 adition (default), 1 sustraction In1-In2, 2 multiplication In1*In2, 3 divisiuon In1/In2, 4 sqrt In1, 5 log In1, 6 exp In1, 7 incremental int [In1..In2], 8 random int [In1..In2], 9 sin In1-rad, 10 cos In1-rad, 11 tan In1-rad, 12 asin In 1, 13 acos In1, 14 atan In1, 15 atan2 In1 In2 , 16 min, 17 max, 18 abs In1 ",int,"");
BBTK_OUTPUT(MathOperation,Out,"Output",double,"");
BBTK_END_DESCRIBE_BLACK_BOX(MathOperation);
--- /dev/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)
+//=====
+#include "bbstdMathOperationVector.h"
+#include "bbstdPackage.h"
+
+#include <math.h>
+#include <stdlib.h>
+#include <time.h>
+
+namespace bbstd
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MathOperationVector)
+BBTK_BLACK_BOX_IMPLEMENTATION(MathOperationVector,bbtk::AtomicBlackBox);
+
+double MathOperationVector::g(std::vector<double>*v,unsigned int i,double defValue )
+{
+ double result=defValue;
+ if (i < (*v).size())
+ {
+ result= (*v)[i];
+ }
+ return result;
+}
+
+void MathOperationVector::SumVector(std::vector<double> *v,std::vector<double> *vr)
+{
+ unsigned int i;
+ double tmpResult=0;
+ unsigned int sizeVec=v->size();
+ if ( sizeVec>0)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ tmpResult = (*v)[i] + tmpResult;
+ } // for i
+ vr->push_back( tmpResult );
+ } // if sizeVec
+}
+
+
+void MathOperationVector::MinVector(std::vector<double> *v,std::vector<double> *vr)
+{
+ unsigned int i;
+ double tmpResult;
+ unsigned int sizeVec=v->size();
+ if ( sizeVec>0)
+ {
+ tmpResult=(*v)[0];
+ for (i=1;i<sizeVec;i++)
+ {
+ tmpResult = fmin ( (*v)[i] , tmpResult ) ;
+ } // for i
+ vr->push_back( tmpResult );
+ } // if sizeVec
+}
+
+
+void MathOperationVector::MaxVector(std::vector<double> *v,std::vector<double> *vr)
+{
+ unsigned int i;
+ double tmpResult;
+ unsigned int sizeVec=v->size();
+ if ( sizeVec>0)
+ {
+ tmpResult=(*v)[0];
+ for (i=1;i<sizeVec;i++)
+ {
+ tmpResult = fmax ( (*v)[i] , tmpResult ) ;
+ } // for i
+ vr->push_back( tmpResult );
+ } // if sizeVec
+}
+
+//=====
+// 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 MathOperationVector::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')
+
+ bool error;
+ unsigned int i;
+ unsigned int sizeVec = bbGetInputIn0().size();
+ double tmpResult;
+ std::vector<double> resultVec;
+ std::vector<double> _v0=bbGetInputIn0();
+ std::vector<double> _v1=bbGetInputIn1();
+ std::vector<double> _v2=bbGetInputIn2();
+ std::vector<double> _v3=bbGetInputIn3();
+ std::vector<double> _v4=bbGetInputIn4();
+ std::vector<double> _v5=bbGetInputIn5();
+ std::vector<double> _v6=bbGetInputIn6();
+ std::vector<double> _v7=bbGetInputIn7();
+ std::vector<double> _v8=bbGetInputIn8();
+ std::vector<double> _v9=bbGetInputIn9();
+
+ std::vector<double> *v0 = &_v0;
+ std::vector<double> *v1 = &_v1;
+ std::vector<double> *v2 = &_v2;
+ std::vector<double> *v3 = &_v3;
+ std::vector<double> *v4 = &_v4;
+ std::vector<double> *v5 = &_v5;
+ std::vector<double> *v6 = &_v6;
+ std::vector<double> *v7 = &_v7;
+ std::vector<double> *v8 = &_v8;
+ std::vector<double> *v9 = &_v9;
+
+ double minTmp;
+ double maxTmp;
+
+ if (firsttime==true)
+ {
+ firsttime=false;
+ /* initialize random seed: */
+ srand (time(NULL));
+ if (bbGetInputType()==7)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ acum.push_back(bbGetInputIn0()[i]);
+ } // for
+ } // if 7
+ } // if firsttime
+
+
+ if (bbGetInputType()==0)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ tmpResult = g(v0,i,0) + g(v1,i,0) + g(v2,i,0) + g(v3,i,0) +
+ g(v4,i,0) + g(v5,i,0) + g(v6,i,0) +
+ g(v7,i,0) + g(v8,i,0) + g(v9,i,0) ;
+ resultVec.push_back( tmpResult );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // if Type 0
+
+ if (bbGetInputType()==-99)
+ {
+ SumVector(v0,&resultVec);
+ SumVector(v1,&resultVec);
+ SumVector(v2,&resultVec);
+ SumVector(v3,&resultVec);
+ SumVector(v4,&resultVec);
+ SumVector(v5,&resultVec);
+ SumVector(v6,&resultVec);
+ SumVector(v7,&resultVec);
+ SumVector(v8,&resultVec);
+ SumVector(v9,&resultVec);
+
+ bbSetOutputOut( resultVec );
+ } // if Type -99
+
+
+
+ if (bbGetInputType()==1)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ tmpResult = g(v0,i,0) - g(v1,i,0) - g(v2,i,0) - g(v3,i,0) -
+ g(v4,i,0) - g(v5,i,0) - g(v6,i,0) -
+ g(v7,i,0) - g(v8,i,0) - g(v9,i,0) ;
+ resultVec.push_back( tmpResult );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // if Type 1
+
+
+ if (bbGetInputType()==2)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ tmpResult = g(v0,i,0) * g(v1,i,1) * g(v2,i,1) * g(v3,i,1) *
+ g(v4,i,1) * g(v5,i,1) * g(v6,i,1) *
+ g(v7,i,1) * g(v8,i,1) * g(v9,i,1) ;
+ resultVec.push_back( tmpResult );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // if Type 2
+
+
+
+ if (bbGetInputType()==3)
+ {
+ error = false;
+ for (i=0;i<sizeVec;i++)
+ {
+ if (g(v1,i,1)!=0) tmpResult = g(v0,i,0) / g(v1,i,1); else error=true;
+ if (g(v2,i,1)!=0) tmpResult = tmpResult / g(v2,i,1); else error=true;
+ if (g(v3,i,1)!=0) tmpResult = tmpResult / g(v3,i,1); else error=true;
+ if (g(v4,i,1)!=0) tmpResult = tmpResult / g(v4,i,1); else error=true;
+ if (g(v5,i,1)!=0) tmpResult = tmpResult / g(v5,i,1); else error=true;
+ if (g(v6,i,1)!=0) tmpResult = tmpResult / g(v6,i,1); else error=true;
+ if (g(v7,i,1)!=0) tmpResult = tmpResult / g(v7,i,1); else error=true;
+ if (g(v8,i,1)!=0) tmpResult = tmpResult / g(v8,i,1); else error=true;
+ if (g(v9,i,1)!=0) tmpResult = tmpResult / g(v9,i,1); else error=true;
+ if (error==true) tmpResult = 99999;
+ resultVec.push_back( tmpResult );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // if Type 3
+
+
+ if (bbGetInputType()==4)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ if (bbGetInputIn0()[i]>=0) tmpResult = sqrt( bbGetInputIn0()[i] ) ;
+ else tmpResult = 0 ;
+ resultVec.push_back( tmpResult );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // if Type 4
+
+
+ if (bbGetInputType()==5)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ if (bbGetInputIn0()[i]>0) tmpResult = log( bbGetInputIn0()[i] ) ;
+ else tmpResult = -99999 ;
+ resultVec.push_back( tmpResult );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // if Type 5
+
+
+
+ if (bbGetInputType()==6)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( exp( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 6
+
+
+ if (bbGetInputType()==7)
+ {
+ bbSetOutputOut( acum );
+ for (i=0;i<sizeVec;i++)
+ {
+ acum[i]++;
+ if (acum[i]>g(v1,i,0)) acum[i]=g(v0,i,0);
+ } // for
+ } // if Type 7
+
+ if (bbGetInputType()==8 )
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( rand() % (int)( g(v1,i,0)-g(v0,i,0) ) + g(v0,i,0) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 8
+
+ if (bbGetInputType()==9)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( sin( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 9
+
+ if (bbGetInputType()==10)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( cos( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 10
+
+ if (bbGetInputType()==11)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( tan( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 11
+
+ if (bbGetInputType()==12)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( asin( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 12
+
+ if (bbGetInputType()==13)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( acos( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 13
+
+ if (bbGetInputType()==14)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( atan( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 14
+
+ if (bbGetInputType()==15)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( atan2( g(v0,i,0) , g(v1,i,0) ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 15
+
+
+ if (bbGetInputType()==16)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ minTmp = fmin( g(v0,i,999999) , g(v1,i,999999) );
+ minTmp = fmin( g(v2,i,999999) , minTmp );
+ minTmp = fmin( g(v3,i,999999) , minTmp );
+ minTmp = fmin( g(v4,i,999999) , minTmp );
+ minTmp = fmin( g(v5,i,999999) , minTmp );
+ minTmp = fmin( g(v6,i,999999) , minTmp );
+ minTmp = fmin( g(v7,i,999999) , minTmp );
+ minTmp = fmin( g(v8,i,999999) , minTmp );
+ minTmp = fmin( g(v9,i,999999) , minTmp );
+ resultVec.push_back( minTmp );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 16
+
+ if (bbGetInputType()==-16)
+ {
+ MinVector(v0,&resultVec);
+ MinVector(v1,&resultVec);
+ MinVector(v2,&resultVec);
+ MinVector(v3,&resultVec);
+ MinVector(v4,&resultVec);
+ MinVector(v5,&resultVec);
+ MinVector(v6,&resultVec);
+ MinVector(v7,&resultVec);
+ MinVector(v8,&resultVec);
+ MinVector(v9,&resultVec);
+
+ bbSetOutputOut( resultVec );
+ } // Type -16
+
+ if (bbGetInputType()==17)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ maxTmp = fmax( g(v0,i,-999999) , g(v1,i,-999999) );
+ maxTmp = fmax( g(v2,i,-999999) , maxTmp );
+ maxTmp = fmax( g(v3,i,-999999) , maxTmp );
+ maxTmp = fmax( g(v4,i,-999999) , maxTmp );
+ maxTmp = fmax( g(v5,i,-999999) , maxTmp );
+ maxTmp = fmax( g(v6,i,-999999) , maxTmp );
+ maxTmp = fmax( g(v7,i,-999999) , maxTmp );
+ maxTmp = fmax( g(v8,i,-999999) , maxTmp );
+ maxTmp = fmax( g(v9,i,-999999) , maxTmp );
+ resultVec.push_back( maxTmp );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 17
+
+
+ if (bbGetInputType()==-17)
+ {
+ MaxVector(v0,&resultVec);
+ MaxVector(v1,&resultVec);
+ MaxVector(v2,&resultVec);
+ MaxVector(v3,&resultVec);
+ MaxVector(v4,&resultVec);
+ MaxVector(v5,&resultVec);
+ MaxVector(v6,&resultVec);
+ MaxVector(v7,&resultVec);
+ MaxVector(v8,&resultVec);
+ MaxVector(v9,&resultVec);
+ bbSetOutputOut( resultVec );
+ } // Type -17
+
+
+ if (bbGetInputType()==18)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ resultVec.push_back( fabs( bbGetInputIn0()[i] ) );
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 18
+
+
+}
+
+//=====
+// 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 MathOperationVector::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+
+ bbSetInputType(0);
+ firsttime=true;
+
+
+}
+//=====
+// 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 MathOperationVector::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 MathOperationVector::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbstd
+
+
--- /dev/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)
+//=====
+#ifndef __bbstdMathOperationVector_h_INCLUDED__
+#define __bbstdMathOperationVector_h_INCLUDED__
+#include "bbstd_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbstd
+{
+
+class bbstd_EXPORT MathOperationVector
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(MathOperationVector,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)
+//=====
+ BBTK_DECLARE_INPUT(In0,std::vector <double>);
+ BBTK_DECLARE_INPUT(In1,std::vector <double>);
+ BBTK_DECLARE_INPUT(In2,std::vector <double>);
+ BBTK_DECLARE_INPUT(In3,std::vector <double>);
+ BBTK_DECLARE_INPUT(In4,std::vector <double>);
+ BBTK_DECLARE_INPUT(In5,std::vector <double>);
+ BBTK_DECLARE_INPUT(In6,std::vector <double>);
+ BBTK_DECLARE_INPUT(In7,std::vector <double>);
+ BBTK_DECLARE_INPUT(In8,std::vector <double>);
+ BBTK_DECLARE_INPUT(In9,std::vector <double>);
+ BBTK_DECLARE_INPUT(Type,int);
+ BBTK_DECLARE_OUTPUT(Out,std::vector <double>);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ bool firsttime;
+ std::vector<double> acum;
+
+ double g(std::vector<double>*v,unsigned int i,double defValue );
+ void SumVector(std::vector<double> *v,std::vector<double> *vr);
+ void MinVector(std::vector<double> *v,std::vector<double> *vr);
+ void MaxVector(std::vector<double> *v,std::vector<double> *vr);
+
+
+//=====
+// 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)
+//=====
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(MathOperationVector,bbtk::AtomicBlackBox);
+ BBTK_NAME("MathOperationVector");
+ BBTK_AUTHOR("Info-Dev");
+ BBTK_DESCRIPTION("Out[i] = In0[i] <operation> In1[i] <operation> In2[i] ... In8[i] <operation> In9[i]");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(MathOperationVector,In0,"Input vector 0",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In1,"Input vector 1",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In2,"Input vector 2",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In3,"Input vector 3",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In4,"Input vector 4",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In5,"Input vector 5",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In6,"Input vector 6",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In7,"Input vector 7",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In8,"Input vector 8",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,In9,"Input vector 9",std::vector<double>,"");
+ BBTK_INPUT(MathOperationVector,Type,"Type (defalult 0): 0 adition (default) In0[i]+In1[i]+..+In9[i], -99 adition In0[i] In1[i] ... In[9], 1 sustraction In0[i]-In1[i]-..-In9[i], 2 multiplication In0[i]*In2[i]*...*In9[i], 3 divisiuon In0/In2/.../In9, 4 sqrt In1, 5 log10 In1, 6 exp In1, 7 incremental int [In0..In1], 8 random int [In0..In1], 9 (rad) sin In0, 10 (rad) cos In0, 11 tan (rad) In0, 12 asin In0, 13 acos In0, 14 atan In0, 15 atan2 In0 In1 , 16 min (In0[i],In1[i]..In9[i]), -16 min(In0) min(In1) ... min(In9) , 17 max (In0[i],In1[i]..In9[i]), -17 max(In0) max(In1) ... max(In9) , 18 abs In0 " ,int,"");
+
+ BBTK_OUTPUT(MathOperationVector,Out,"Output vector",std::vector<double>,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(MathOperationVector);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbstd
+
+#endif // __bbstdMathOperationVector_h_INCLUDED__
+
}
fclose(ff1);
} else { // else ff1
- printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Points>%s", bbGetInputFileName().c_str() );
+ printf("ReadColumnsDouble::Process ...Error... reading file FileName <%s>\n", bbGetInputFileName().c_str() );
} //ff1
i=1; if (i<=bbGetInputDimension()) { bbSetOutputlstData1( *(tlst[i-1]) ); }
--- /dev/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)
+//=====
+#include "bbstdReplaceString.h"
+#include "bbstdPackage.h"
+namespace bbstd
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ReplaceString)
+BBTK_BLACK_BOX_IMPLEMENTATION(ReplaceString,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 ReplaceString::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')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ std::string subject = bbGetInputIn();
+ size_t pos = 0;
+ while((pos = subject.find(bbGetInputSearch(), pos)) != std::string::npos)
+ {
+ subject.replace(pos, bbGetInputSearch().length(), bbGetInputReplace());
+ pos += bbGetInputReplace().length();
+ }
+ bbSetOutputOut(subject);
+
+}
+//=====
+// 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 ReplaceString::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn("");
+ bbSetInputReplace("");
+ bbSetInputSearch("");
+
+}
+//=====
+// 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 ReplaceString::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 ReplaceString::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbstd
+
+
--- /dev/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)
+//=====
+#ifndef __bbstdReplaceString_h_INCLUDED__
+#define __bbstdReplaceString_h_INCLUDED__
+#include "bbstd_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <string>
+
+namespace bbstd
+{
+
+class bbstd_EXPORT ReplaceString
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ReplaceString,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)
+//=====
+ BBTK_DECLARE_INPUT(In,std::string);
+ BBTK_DECLARE_INPUT(Search,std::string);
+ BBTK_DECLARE_INPUT(Replace,std::string);
+ BBTK_DECLARE_OUTPUT(Out,std::string);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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)
+//=====
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReplaceString,bbtk::AtomicBlackBox);
+ BBTK_NAME("ReplaceString");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(ReplaceString,In,"Input string",std::string,"");
+ BBTK_INPUT(ReplaceString,Search,"Searche sub string ",std::string,"");
+ BBTK_INPUT(ReplaceString,Replace,"Replace new string",std::string,"");
+ BBTK_OUTPUT(ReplaceString,Out,"Output string",std::string,"");
+BBTK_END_DESCRIBE_BLACK_BOX(ReplaceString);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbstd
+
+#endif // __bbstdReplaceString_h_INCLUDED__
+
--- /dev/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)
+//=====
+#include "bbstdSplitFilePathVector.h"
+#include "bbstdPackage.h"
+namespace bbstd
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,SplitFilePathVector)
+BBTK_BLACK_BOX_IMPLEMENTATION(SplitFilePathVector,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 SplitFilePathVector::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')
+
+// bbSetOutputOut( bbGetInputIn() );nt
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ std::size_t found;
+ std::string filename;
+
+ std::vector<std::string> LstPath;
+ std::vector<std::string> LstFileName;
+ std::vector<std::string> LstBaseName;
+ std::vector<std::string> LstExtention;
+
+ unsigned int i, size=bbGetInputIn().size();
+ for (i=0;i<size;i++)
+ {
+ found = bbGetInputIn()[i].find_last_of("/\\");
+ LstPath.push_back( bbGetInputIn()[i].substr(0,found+1) );
+ filename = bbGetInputIn()[i].substr(found+1);
+ LstFileName.push_back( filename );
+ found = filename.find_last_of(".");
+ LstBaseName.push_back( filename.substr(0,found) );
+ LstExtention.push_back( filename.substr(found+1) );
+ }
+
+ bbSetOutputPath( LstPath );
+ bbSetOutputBaseName( LstBaseName );
+ bbSetOutputExt( LstExtention );
+ bbSetOutputFileName( LstFileName );
+
+#ifdef _WIN32
+ bbSetOutputSlash("\\");
+#else
+ bbSetOutputSlash("/");
+#endif
+
+
+}
+//=====
+// 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 SplitFilePathVector::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+// bbSetInputIn(0);
+
+}
+//=====
+// 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 SplitFilePathVector::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 SplitFilePathVector::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbstd
+
+
--- /dev/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)
+//=====
+#ifndef __bbstdSplitFilePathVector_h_INCLUDED__
+#define __bbstdSplitFilePathVector_h_INCLUDED__
+#include "bbstd_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbstd
+{
+
+class bbstd_EXPORT SplitFilePathVector
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(SplitFilePathVector,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)
+//=====
+ BBTK_DECLARE_INPUT(In,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Path,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(BaseName,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Ext,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(FileName,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Slash,std::string);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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)
+//=====
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(SplitFilePathVector,bbtk::AtomicBlackBox);
+ BBTK_NAME("SplitFilePathVector");
+ BBTK_AUTHOR("Info-Dev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(SplitFilePathVector,In,"PathFileName",std::vector<std::string>,"");
+
+ BBTK_OUTPUT(SplitFilePathVector,Path,"Path",std::vector<std::string>,"");
+ BBTK_OUTPUT(SplitFilePathVector,BaseName,"Base Name",std::vector<std::string>,"");
+ BBTK_OUTPUT(SplitFilePathVector,Ext,"Extention",std::vector<std::string>,"");
+ BBTK_OUTPUT(SplitFilePathVector,FileName,"File Name",std::vector<std::string>,"");
+ BBTK_OUTPUT(SplitFilePathVector,Slash,"Slash Linux or Back slash Windows",std::string,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(SplitFilePathVector);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbstd
+
+#endif // __bbstdSplitFilePathVector_h_INCLUDED__
+
FILE *ff = fopen(bbGetInputFileName().c_str(),"w");
if (ff!=NULL)
{
- fprintf(ff,"%s \n",bbGetInputIn0().c_str());
- fprintf(ff,"%s \n",bbGetInputIn1().c_str());
- fprintf(ff,"%s \n",bbGetInputIn2().c_str());
- fprintf(ff,"%s \n",bbGetInputIn3().c_str());
- fprintf(ff,"%s \n",bbGetInputIn4().c_str());
- fprintf(ff,"%s \n",bbGetInputIn5().c_str());
- fprintf(ff,"%s \n",bbGetInputIn6().c_str());
- fprintf(ff,"%s \n",bbGetInputIn7().c_str());
- fprintf(ff,"%s \n",bbGetInputIn8().c_str());
- fprintf(ff,"%s \n",bbGetInputIn9().c_str());
+ if (bbGetInputIn0()!="") { fprintf(ff,"%s \n",bbGetInputIn0().c_str()); }
+ if (bbGetInputIn1()!="") { fprintf(ff,"%s \n",bbGetInputIn1().c_str()); }
+ if (bbGetInputIn2()!="") { fprintf(ff,"%s \n",bbGetInputIn2().c_str()); }
+ if (bbGetInputIn3()!="") { fprintf(ff,"%s \n",bbGetInputIn3().c_str()); }
+ if (bbGetInputIn4()!="") { fprintf(ff,"%s \n",bbGetInputIn4().c_str()); }
+ if (bbGetInputIn5()!="") { fprintf(ff,"%s \n",bbGetInputIn5().c_str()); }
+ if (bbGetInputIn6()!="") { fprintf(ff,"%s \n",bbGetInputIn6().c_str()); }
+ if (bbGetInputIn7()!="") { fprintf(ff,"%s \n",bbGetInputIn7().c_str()); }
+ if (bbGetInputIn8()!="") { fprintf(ff,"%s \n",bbGetInputIn8().c_str()); }
+ if (bbGetInputIn9()!="") { fprintf(ff,"%s \n",bbGetInputIn9().c_str()); }
fclose(ff);
}
}
--- /dev/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)
+//=====
+#include "bbstdTransposeVectors.h"
+#include "bbstdPackage.h"
+namespace bbstd
+{
+
+BBTK_BLACK_BOX_TEMPLATE_IMPLEMENTATION(TransposeVectors,bbtk::AtomicBlackBox);
+
+BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,TransposeVectors,int);
+BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,TransposeVectors,float);
+BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,TransposeVectors,double);
+typedef std::string string;
+BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,TransposeVectors,string);
+
+
+}
+// EO namespace bbstd
+
+
--- /dev/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)
+//=====
+#ifndef __bbstdTransposeVectors_h_INCLUDED__
+#define __bbstdTransposeVectors_h_INCLUDED__
+#include "bbstd_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbstd
+{
+template <class T>
+class bbstd_EXPORT TransposeVectors
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_TEMPLATE_BLACK_BOX_INTERFACE(TransposeVectors,bbtk::AtomicBlackBox,T);
+
+//=====
+// 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)
+//=====
+ BBTK_DECLARE_INPUT(In0,std::vector<T>);
+ BBTK_DECLARE_INPUT(In1,std::vector<T>);
+ BBTK_DECLARE_INPUT(In2,std::vector<T>);
+ BBTK_DECLARE_INPUT(In3,std::vector<T>);
+ BBTK_DECLARE_INPUT(In4,std::vector<T>);
+ BBTK_DECLARE_INPUT(In5,std::vector<T>);
+ BBTK_DECLARE_INPUT(In6,std::vector<T>);
+ BBTK_DECLARE_INPUT(In7,std::vector<T>);
+ BBTK_DECLARE_INPUT(In8,std::vector<T>);
+ BBTK_DECLARE_INPUT(In9,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out0,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out1,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out2,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out3,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out4,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out5,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out6,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out7,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out8,std::vector<T>);
+ BBTK_DECLARE_OUTPUT(Out9,std::vector<T>);
+ BBTK_PROCESS(DoIt);
+ void DoIt();
+//=====
+// 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)
+//=====
+};
+BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(TransposeVectors,bbtk::AtomicBlackBox);
+ BBTK_NAME("TransposeVector"+bbtk::HumanTypeName<std::vector<T> >());
+ BBTK_AUTHOR("Info-Dev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+
+ typedef std::vector<T> Tvector;
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In0,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In1,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In2,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In3,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In4,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In5,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In6,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In7,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In8,"Vector input",Tvector);
+ BBTK_TEMPLATE_INPUT(TransposeVectors,In9,"Vector input",Tvector);
+
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out0,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out1,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out2,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out3,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out4,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out5,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out6,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out7,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out8,"Vector output",Tvector);
+ BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out9,"Vector output",Tvector);
+
+BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(TransposeVectors);
+
+
+ //=================================================================
+ template <class T>
+ void TransposeVectors<T>::DoIt()
+ {
+ unsigned int i,j;
+ std::vector<T> tmpVec;
+
+ std::vector<T> out0;
+ std::vector<T> out1;
+ std::vector<T> out2;
+ std::vector<T> out3;
+ std::vector<T> out4;
+ std::vector<T> out5;
+ std::vector<T> out6;
+ std::vector<T> out7;
+ std::vector<T> out8;
+ std::vector<T> out9;
+
+ unsigned int jSize=0;
+
+ unsigned int s0 = bbGetInputIn0().size();
+ unsigned int s1 = bbGetInputIn1().size();
+ unsigned int s2 = bbGetInputIn2().size();
+ unsigned int s3 = bbGetInputIn3().size();
+ unsigned int s4 = bbGetInputIn4().size();
+ unsigned int s5 = bbGetInputIn5().size();
+ unsigned int s6 = bbGetInputIn6().size();
+ unsigned int s7 = bbGetInputIn7().size();
+ unsigned int s8 = bbGetInputIn8().size();
+ unsigned int s9 = bbGetInputIn9().size();
+
+
+ if (s0>0) { jSize++; }
+ if (s1>0) { jSize++; }
+ if (s2>0) { jSize++; }
+ if (s3>0) { jSize++; }
+ if (s4>0) { jSize++; }
+ if (s5>0) { jSize++; }
+ if (s6>0) { jSize++; }
+ if (s7>0) { jSize++; }
+ if (s8>0) { jSize++; }
+ if (s9>0) { jSize++; }
+
+
+ for (j=0;j<jSize;j++)
+ {
+
+ if (j==0){ tmpVec = bbGetInputIn0(); }
+ if (j==1){ tmpVec = bbGetInputIn1(); }
+ if (j==2){ tmpVec = bbGetInputIn2(); }
+ if (j==3){ tmpVec = bbGetInputIn3(); }
+ if (j==4){ tmpVec = bbGetInputIn4(); }
+ if (j==5){ tmpVec = bbGetInputIn5(); }
+ if (j==6){ tmpVec = bbGetInputIn6(); }
+ if (j==7){ tmpVec = bbGetInputIn7(); }
+ if (j==8){ tmpVec = bbGetInputIn8(); }
+ if (j==9){ tmpVec = bbGetInputIn9(); }
+ for (i=0;i<s0;i++)
+ {
+ if (tmpVec.size()<=s0 )
+ {
+ if (i==0){ out0.push_back( tmpVec[i] ); }
+ if (i==1){ out1.push_back( tmpVec[i] ); }
+ if (i==2){ out2.push_back( tmpVec[i] ); }
+ if (i==3){ out3.push_back( tmpVec[i] ); }
+ if (i==4){ out4.push_back( tmpVec[i] ); }
+ if (i==5){ out5.push_back( tmpVec[i] ); }
+ if (i==6){ out6.push_back( tmpVec[i] ); }
+ if (i==7){ out7.push_back( tmpVec[i] ); }
+ if (i==8){ out8.push_back( tmpVec[i] ); }
+ if (i==9){ out9.push_back( tmpVec[i] ); }
+ } // if //tmpVec size
+ }// for i
+ } // for j
+ bbSetOutputOut0(out0);
+ bbSetOutputOut1(out1);
+ bbSetOutputOut2(out2);
+ bbSetOutputOut3(out3);
+ bbSetOutputOut4(out4);
+ bbSetOutputOut5(out5);
+ bbSetOutputOut6(out6);
+ bbSetOutputOut7(out7);
+ bbSetOutputOut8(out8);
+ bbSetOutputOut9(out9);
+ }
+ //=================================================================
+
+ //=================================================================
+ template <class T>
+ void TransposeVectors<T>::bbUserSetDefaultValues()
+ {
+ }
+ //=================================================================
+ template <class T>
+ void TransposeVectors<T>::bbUserInitializeProcessing()
+ {
+ }
+ //=================================================================
+ template <class T>
+ void TransposeVectors<T>::bbUserFinalizeProcessing()
+ {
+ }
+ //=================================================================
+
+
+
+
+
+//=====
+// 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)
+//=====
+}
+// EO namespace bbstd
+
+#endif // __bbstdTransposeVectors_h_INCLUDED__
+
{
bbUserFinalizeProcessing();
result = vtkTransform::New();
+ result->Update();
}
// --------------------------------------------------------------
result->Concatenate( bbGetInputIn()->GetMatrix() );
}
- if (bbGetInputScale().size()>=3)
- {
- result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]);
- }
if ((bbGetInputTranslate().size()>=3) && (bbGetInputSpacing().size()>=3))
{
double tx = bbGetInputTranslate()[0] * bbGetInputSpacing()[0];
double ty = bbGetInputTranslate()[1] * bbGetInputSpacing()[1];
double tz = bbGetInputTranslate()[2] * bbGetInputSpacing()[2];
+printf("Transform::Process() %f %f %f\n",tx, ty,tz);
result->Translate(tx,ty,tz);
}
+ if (bbGetInputScale().size()>=3)
+ {
+ result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]);
+ }
+
if (bbGetInputRotateWXYZ().size()>=4)
{
result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]);
}
- result->Update();
+
bbSetOutputOut(result);
}
vtkTransform *result;
};
- BBTK_BEGIN_DESCRIBE_BLACK_BOX(Transform,bbtk::AtomicBlackBox);
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(Transform,bbtk::AtomicBlackBox);
BBTK_NAME("Transform");
BBTK_AUTHOR("InfoTeam CREATIS-LRMN");
BBTK_DESCRIPTION("vtkTransform");
BBTK_CATEGORY("math");
+
BBTK_INPUT(Transform,In,"vtkTransform to be concatenate",vtkLinearTransform *,"");
BBTK_INPUT(Transform,Scale,"vector with sx sy sz",std::vector<double>,"");
BBTK_INPUT(Transform,Translate,"vector with x y z",std::vector<double>,"");
BBTK_INPUT(Transform,Spacing,"vector with spacingX spacingY spacingZ",std::vector<double>,"");
BBTK_INPUT(Transform,RotateWXYZ,"vector with Angle Vx Vy Vz",std::vector<double>,"");
+
BBTK_OUTPUT(Transform,Out,"vtkTransform result",vtkLinearTransform *,"");
- BBTK_END_DESCRIBE_BLACK_BOX(Transform);
+
+BBTK_END_DESCRIBE_BLACK_BOX(Transform);
}
// EO namespace bbvtk
if (bbGetInputRenderer()!=NULL)
{
bbGetInputRenderer()->GetRenderWindow()->Render();
+//EED 4 nov 2015 Estelle
+// bbGetInputRenderer()->GradientBackgroundOff();
+// bbGetInputRenderer()->SetBackground( 0 , 0 , 0 );
} // Renderer
} // Active
}