X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdVectorFilterDouble.cxx;h=c132e918a19f4bdf67b98d34977c885849eeb50b;hb=8e21d66a76ff9117acc7dbbaec9123c56115ff56;hp=63d22719334da7b6bb2062b1bef187f4811664d7;hpb=fbfcf39b0f5c8b6e34cb251564df64974b656d31;p=bbtk.git diff --git a/packages/std/src/bbstdVectorFilterDouble.cxx b/packages/std/src/bbstdVectorFilterDouble.cxx index 63d2271..c132e91 100644 --- a/packages/std/src/bbstdVectorFilterDouble.cxx +++ b/packages/std/src/bbstdVectorFilterDouble.cxx @@ -3,6 +3,8 @@ //===== #include "bbstdVectorFilterDouble.h" #include "bbstdPackage.h" +#include "math.h" + namespace bbstd { @@ -13,7 +15,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VectorFilterDouble,bbtk::AtomicBlackBox); //===== void VectorFilterDouble::Process() { - // THE MAIN PROCESSING METHOD BODY // Here we simply set the input 'In' value to the output 'Out' // And print out the output value @@ -25,7 +26,6 @@ void VectorFilterDouble::Process() // (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') - std::vector< std::vector * > pLstVec; std::vector< std::vector * > pLstVecOut; std::vector In0 = bbGetInputIn0(); @@ -38,7 +38,6 @@ void VectorFilterDouble::Process() std::vector In7 = bbGetInputIn7(); std::vector In8 = bbGetInputIn8(); std::vector In9 = bbGetInputIn9(); - if (bbGetInputIn0().size()!=0) { pLstVec.push_back( &In0 ); } if (bbGetInputIn1().size()!=0) { pLstVec.push_back( &In1 ); } if (bbGetInputIn2().size()!=0) { pLstVec.push_back( &In2 ); } @@ -49,7 +48,6 @@ void VectorFilterDouble::Process() if (bbGetInputIn7().size()!=0) { pLstVec.push_back( &In7 ); } if (bbGetInputIn8().size()!=0) { pLstVec.push_back( &In8 ); } if (bbGetInputIn9().size()!=0) { pLstVec.push_back( &In9 ); } - std::vector Out0; std::vector Out1; std::vector Out2; @@ -60,7 +58,6 @@ void VectorFilterDouble::Process() std::vector Out7; std::vector Out8; std::vector Out9; - pLstVecOut.push_back( &Out0 ); pLstVecOut.push_back( &Out1 ); pLstVecOut.push_back( &Out2 ); @@ -71,49 +68,48 @@ void VectorFilterDouble::Process() pLstVecOut.push_back( &Out7 ); pLstVecOut.push_back( &Out8 ); pLstVecOut.push_back( &Out9 ); - - if (bbGetInputType()==0) // Erase duplicate lines { - bool okSizeVec=true; - int ipLstvec; - for (ipLstvec=1;ipLstvec=2 } // for pLstVec } // Type==2 - - - if (bbGetInputType()==3) // Addition k1 + if (bbGetInputType()==3) // Addition k1[0] { int ipLstvec; int i; @@ -164,13 +155,12 @@ void VectorFilterDouble::Process() size=(*pLstVec[ipLstvec]).size(); for (i=0;i0) && (In3.size()==3) ) + { + int i; + double x1 = In3[0]; // pointX of pointXYZ + double y1 = In3[1]; // pointY of pointXYZ + double z1 = In3[2]; // pointZ of pointXYZ + double distMin = 100000; + double dist; + double x2; + double y2; + double z2; + Out0.push_back( -1 ); + Out1.push_back( -999 ); + Out1.push_back( -999 ); + Out1.push_back( -999 ); + for (i=0;i spc = bbGetInputk1(); + if (spc.size()>=1) + { + for (i=0;i=2) + { + for (i=0;i=3) + { + for (i=0;i spc = bbGetInputk1(); + if (spc.size()>=1) + { + if (spc[0]!=0) + { + for (i=0;i=2) + { + if (spc[0]!=0) + { + for (i=0;i=3) + { + if (spc[0]!=0) + { + for (i=0;i k1 =bbGetInputk1(); + int iSeg, sizeLstIndex = In3.size(); + int iGeneral=0; + int i, size; + for (iSeg = 0; iSeg k1; + k1.push_back(0); + bbSetInputk1(k1); } + //===== // 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 VectorFilterDouble::bbUserInitializeProcessing() { - // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers -// if any - - +// 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 VectorFilterDouble::bbUserFinalizeProcessing() { - // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any - } -} -// EO namespace bbstd + +}// EO namespace bbstd