X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMathOperationVector.cxx;h=cbd934fd015f4d523779927973fd25aa5b2eaa46;hb=ebd959d24db8fadb99999dbdecf69693d88e0629;hp=2fc5d4ebd832be976b5ac26f780693645c7593dc;hpb=03cc68dd6b831aa98e1e0fad20a977ffa074be39;p=bbtk.git diff --git a/packages/std/src/bbstdMathOperationVector.cxx b/packages/std/src/bbstdMathOperationVector.cxx index 2fc5d4e..cbd934f 100644 --- a/packages/std/src/bbstdMathOperationVector.cxx +++ b/packages/std/src/bbstdMathOperationVector.cxx @@ -5,7 +5,6 @@ #include "bbstdPackage.h" #include -#include #include namespace bbstd @@ -50,7 +49,7 @@ void MathOperationVector::MinVector(std::vector *v,std::vector * tmpResult=(*v)[0]; for (i=1;ipush_back( tmpResult ); } // if sizeVec @@ -67,7 +66,7 @@ void MathOperationVector::MaxVector(std::vector *v,std::vector * tmpResult=(*v)[0]; for (i=1;ipush_back( tmpResult ); } // if sizeVec @@ -117,8 +116,8 @@ void MathOperationVector::Process() std::vector *v8 = &_v8; std::vector *v9 = &_v9; - double minTmp; - double maxTmp; + double minTmp; + double maxTmp; if (firsttime==true) { @@ -335,15 +334,15 @@ void MathOperationVector::Process() { for (i=0;i bbGetInputIn1()[i]) + { + resultVec.push_back( 1 ); + } else { + resultVec.push_back( 0 ); + } + } // for i + bbSetOutputOut( resultVec ); + } // Type 21 + + + if (bbGetInputType()==22) + { + double resultX=0; + double resultY=0; + double resultZ=0; + double resultMassTotal=0; + for (i=0;i