From: Eduardo DAVILA Date: Tue, 27 Apr 2021 18:21:40 +0000 (+0200) Subject: #3460 MathOperation equal option X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b4a771dc611d944e7d20bc7ba9a4a3a7c6dcffe5;p=bbtk.git #3460 MathOperation equal option --- diff --git a/packages/std/src/bbstdMathOperation.cxx b/packages/std/src/bbstdMathOperation.cxx index a0cd944..3ab9e6f 100644 --- a/packages/std/src/bbstdMathOperation.cxx +++ b/packages/std/src/bbstdMathOperation.cxx @@ -92,6 +92,7 @@ void MathOperation::Process() if (bbGetInputType()==24) bbSetOutputOut( floor( bbGetInputIn1() ) ); if (bbGetInputType()==25) bbSetOutputOut( ceil( bbGetInputIn1() ) ); if (bbGetInputType()==26) bbSetOutputOut( trunc( bbGetInputIn1() ) ); + if (bbGetInputType()==30) if (bbGetInputIn1()==(int)bbGetInputIn2()) { bbSetOutputOut(1); } else { bbSetOutputOut(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) diff --git a/packages/std/src/bbstdMathOperation.h b/packages/std/src/bbstdMathOperation.h index a167679..a6dc725 100644 --- a/packages/std/src/bbstdMathOperation.h +++ b/packages/std/src/bbstdMathOperation.h @@ -42,7 +42,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(MathOperation,bbtk::AtomicBlackBox); 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-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, 19 module In1%In2 , 20 lessThan In1In2, 22 round In1, 23 rint In1, 24 floor In1, 25 ceil In1, 26 trunc In1",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, 19 module In1%In2 , 20 lessThan In1In2, 22 round In1, 23 rint In1, 24 floor In1, 25 ceil In1, 26 trunc In1, 30 equal In1=In2",int,""); BBTK_OUTPUT(MathOperation,Out,"Output",double,""); BBTK_END_DESCRIBE_BLACK_BOX(MathOperation); diff --git a/packages/std/src/bbstdVectorFilterDouble.h b/packages/std/src/bbstdVectorFilterDouble.h index 909854b..4aee501 100644 --- a/packages/std/src/bbstdVectorFilterDouble.h +++ b/packages/std/src/bbstdVectorFilterDouble.h @@ -52,7 +52,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterDouble,bbtk::AtomicBlackBox); BBTK_AUTHOR("InfoDev"); BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); - BBTK_INPUT(VectorFilterDouble,Type,"default (0) 0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition, 4=Substraction, 5=Multilication, 6=Division, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In0-lstX In1-lstY In2-lstZ In3-PointXYZ (Out0-index Out1-PointXYZ)",int,""); + BBTK_INPUT(VectorFilterDouble,Type,"default (0) 0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition, 4=Substraction, 5=Multilication, 6=Division, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ (Out0-index Out1-PointXYZ)",int,""); BBTK_INPUT(VectorFilterDouble,k1,"default (0) nothing (Type0), k1=new size vectors (Type 1) , nothing (Type2), k1 = Addition const. (Type 3), k1 = Substraction const. (Type 4), k1 = Multiplication const. (Type 5) , k1 = Division const. (Type 6) , ",double,""); BBTK_INPUT(VectorFilterDouble,In0,"Input vector",std::vector,""); BBTK_INPUT(VectorFilterDouble,In1,"Input vector",std::vector,"");